Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: chrome/renderer/extensions/runtime_custom_bindings.h

Issue 12300041: Add nativeMessaging extension permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/renderer/extensions/chrome_v8_extension.h" 9 #include "chrome/renderer/extensions/chrome_v8_extension.h"
10 #include "v8/include/v8.h" 10 #include "v8/include/v8.h"
11 11
12 class ExtensionDispatcher; 12 class ExtensionDispatcher;
13 class ChromeV8Context; 13 class ChromeV8Context;
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 // The native component of custom bindings for the chrome.runtime API. 17 // The native component of custom bindings for the chrome.runtime API.
18 class RuntimeCustomBindings : public ChromeV8Extension { 18 class RuntimeCustomBindings : public ChromeV8Extension {
19 public: 19 public:
20 explicit RuntimeCustomBindings(ChromeV8Context* context); 20 RuntimeCustomBindings(Dispatcher* dispatcher,
21 ChromeV8Context* context);
21 22
22 virtual ~RuntimeCustomBindings(); 23 virtual ~RuntimeCustomBindings();
23 24
24 // Creates a new messaging channel to the given extension. 25 // Creates a new messaging channel to the given extension.
25 static v8::Handle<v8::Value> OpenChannelToExtension( 26 static v8::Handle<v8::Value> OpenChannelToExtension(
26 const v8::Arguments& args); 27 const v8::Arguments& args);
27 28
28 static v8::Handle<v8::Value> OpenChannelToNativeApp( 29 // Creates a new messaging channels for the specified native application.
30 v8::Handle<v8::Value> OpenChannelToNativeApp(
29 const v8::Arguments& args); 31 const v8::Arguments& args);
30 32
31 private: 33 private:
32 v8::Handle<v8::Value> GetManifest(const v8::Arguments& args); 34 v8::Handle<v8::Value> GetManifest(const v8::Arguments& args);
33 35
34 ChromeV8Context* context_; 36 ChromeV8Context* context_;
35 }; 37 };
36 38
37 } // extensions 39 } // extensions
38 40
39 #endif // CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_ 41 #endif // CHROME_RENDERER_EXTENSIONS_RUNTIME_CUSTOM_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/renderer/extensions/runtime_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698