[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ | ||||
6 | #define CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ | ||||
[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 7 | |
8 | #include "base/compiler_specific.h" | ||||
9 | #include "chrome/renderer/extensions/chrome_v8_extension.h" | ||||
10 | #include "v8/include/v8.h" | ||||
11 | |||||
12 | class ExtensionDispatcher; | ||||
13 | class ChromeV8Context; | ||||
14 | |||||
15 | namespace extensions { | ||||
16 | |||||
17 | // The native component of custom bindings for the chrome.runtime API. | ||||
18 | class RuntimeCustomBindings : public ChromeV8Extension { | ||||
19 | public: | ||||
[email protected] | 4f1633f | 2013-03-09 14:26:24 | [diff] [blame] | 20 | RuntimeCustomBindings(Dispatcher* dispatcher, ChromeV8Context* context); |
[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 21 | |
22 | virtual ~RuntimeCustomBindings(); | ||||
23 | |||||
[email protected] | 481a87e6 | 2012-12-19 23:00:27 | [diff] [blame] | 24 | // Creates a new messaging channel to the given extension. |
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame^] | 25 | void OpenChannelToExtension(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | 481a87e6 | 2012-12-19 23:00:27 | [diff] [blame] | 26 | |
[email protected] | 78b7518 | 2013-03-06 03:41:32 | [diff] [blame] | 27 | // Creates a new messaging channels for the specified native application. |
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame^] | 28 | void OpenChannelToNativeApp(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | 481a87e6 | 2012-12-19 23:00:27 | [diff] [blame] | 29 | |
[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 30 | private: |
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame^] | 31 | void GetManifest(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 32 | }; |
33 | |||||
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame^] | 34 | } // namespace extensions |
[email protected] | 120028b9c | 2012-07-03 01:32:24 | [diff] [blame] | 35 | |
36 | #endif // CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ |