blob: d6d2ec145530070738175c09efd459b5702ee19a [file] [log] [blame]
[email protected]e6893672014-05-01 17:29:131// Copyright 2014 The Chromium Authors. All rights reserved.
[email protected]0aa477bd2009-03-23 22:21:432// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]e6893672014-05-01 17:29:135#ifndef EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_
6#define EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_
[email protected]0aa477bd2009-03-23 22:21:437
[email protected]b2e86ec12011-09-15 01:59:068#include <string>
9
rdevlin.cronin4012b3b2016-08-31 18:36:4710#include "base/macros.h"
rdevlin.cronin4012b3b2016-08-31 18:36:4711#include "extensions/renderer/object_backed_native_handler.h"
[email protected]2ee1e3a2011-10-04 15:04:0412
[email protected]83820d42011-11-12 22:03:1113namespace extensions {
Devlin Cronin525e2fd2017-09-12 01:19:5514class ScriptContext;
[email protected]83820d42011-11-12 22:03:1115
Devlin Cronin8448a192019-03-15 01:03:1616// Provides the BindToGC native handler.
17// TODO(devlin): Rename this from messaging bindings - it's no longer remotely
18// messaging related.
rdevlin.cronin4012b3b2016-08-31 18:36:4719class MessagingBindings : public ObjectBackedNativeHandler {
[email protected]0aa477bd2009-03-23 22:21:4320 public:
rdevlin.cronin4012b3b2016-08-31 18:36:4721 explicit MessagingBindings(ScriptContext* script_context);
22 ~MessagingBindings() override;
robd1db9f62016-05-25 11:03:1023
Devlin Cronind9ea8342018-01-27 06:00:0424 // ObjectBackedNativeHandler:
25 void AddRoutes() override;
26
rdevlin.cronin4012b3b2016-08-31 18:36:4727 private:
rdevlin.cronin4012b3b2016-08-31 18:36:4728 void BindToGC(const v8::FunctionCallbackInfo<v8::Value>& args);
29
rdevlin.cronin4012b3b2016-08-31 18:36:4730 DISALLOW_COPY_AND_ASSIGN(MessagingBindings);
[email protected]0aa477bd2009-03-23 22:21:4331};
32
[email protected]53229732013-06-21 02:56:0233} // namespace extensions
[email protected]83820d42011-11-12 22:03:1134
[email protected]e6893672014-05-01 17:29:1335#endif // EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_