[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
[email protected] | 0aa477bd | 2009-03-23 22:21:43 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 5 | #ifndef EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ |
6 | #define EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ | ||||
[email protected] | 0aa477bd | 2009-03-23 22:21:43 | [diff] [blame] | 7 | |
[email protected] | b2e86ec1 | 2011-09-15 01:59:06 | [diff] [blame] | 8 | #include <string> |
9 | |||||
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 10 | #include "base/macros.h" |
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 11 | #include "extensions/renderer/object_backed_native_handler.h" |
[email protected] | 2ee1e3a | 2011-10-04 15:04:04 | [diff] [blame] | 12 | |
[email protected] | 83820d4 | 2011-11-12 22:03:11 | [diff] [blame] | 13 | namespace extensions { |
Devlin Cronin | 525e2fd | 2017-09-12 01:19:55 | [diff] [blame] | 14 | class ScriptContext; |
[email protected] | 83820d4 | 2011-11-12 22:03:11 | [diff] [blame] | 15 | |
Devlin Cronin | 8448a19 | 2019-03-15 01:03:16 | [diff] [blame] | 16 | // Provides the BindToGC native handler. |
17 | // TODO(devlin): Rename this from messaging bindings - it's no longer remotely | ||||
18 | // messaging related. | ||||
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 19 | class MessagingBindings : public ObjectBackedNativeHandler { |
[email protected] | 0aa477bd | 2009-03-23 22:21:43 | [diff] [blame] | 20 | public: |
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 21 | explicit MessagingBindings(ScriptContext* script_context); |
22 | ~MessagingBindings() override; | ||||
rob | d1db9f6 | 2016-05-25 11:03:10 | [diff] [blame] | 23 | |
Devlin Cronin | d9ea834 | 2018-01-27 06:00:04 | [diff] [blame] | 24 | // ObjectBackedNativeHandler: |
25 | void AddRoutes() override; | ||||
26 | |||||
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 27 | private: |
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 28 | void BindToGC(const v8::FunctionCallbackInfo<v8::Value>& args); |
29 | |||||
rdevlin.cronin | 4012b3b | 2016-08-31 18:36:47 | [diff] [blame] | 30 | DISALLOW_COPY_AND_ASSIGN(MessagingBindings); |
[email protected] | 0aa477bd | 2009-03-23 22:21:43 | [diff] [blame] | 31 | }; |
32 | |||||
[email protected] | 5322973 | 2013-06-21 02:56:02 | [diff] [blame] | 33 | } // namespace extensions |
[email protected] | 83820d4 | 2011-11-12 22:03:11 | [diff] [blame] | 34 | |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 35 | #endif // EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_ |