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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compilation 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_MISCELLANEOUS_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/renderer/extensions/chrome_v8_context_set.h" 10 #include "chrome/renderer/extensions/chrome_v8_context_set.h"
(...skipping 12 matching lines...) Expand all
23 class Dispatcher; 23 class Dispatcher;
24 24
25 // Manually implements some random JavaScript bindings for the extension system. 25 // Manually implements some random JavaScript bindings for the extension system.
26 // 26 //
27 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings. 27 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings.
28 // If anything needs to be manual for some reason, it should be implemented in 28 // If anything needs to be manual for some reason, it should be implemented in
29 // its own class. 29 // its own class.
30 class MiscellaneousBindings { 30 class MiscellaneousBindings {
31 public: 31 public:
32 // Creates an instance of the extension. 32 // Creates an instance of the extension.
33 static ChromeV8Extension* Get(Dispatcher* dispatcher); 33 static ChromeV8Extension* Get(Dispatcher* dispatcher,
34 v8::Handle<v8::Context> context);
34 35
35 // Dispatches the Port.onConnect content script messaging event to some 36 // Dispatches the Port.onConnect content script messaging event to some
36 // contexts in |contexts|. If |restrict_to_render_view| is specified, only 37 // contexts in |contexts|. If |restrict_to_render_view| is specified, only
37 // contexts in that render view will receive the message. 38 // contexts in that render view will receive the message.
38 static void DispatchOnConnect( 39 static void DispatchOnConnect(
39 const ChromeV8ContextSet::ContextSet& contexts, 40 const ChromeV8ContextSet::ContextSet& contexts,
40 int target_port_id, 41 int target_port_id,
41 const std::string& channel_name, 42 const std::string& channel_name,
42 const std::string& tab_json, 43 const std::string& tab_json,
43 const std::string& source_extension_id, 44 const std::string& source_extension_id,
(...skipping 14 matching lines...) Expand all
58 static void DispatchOnDisconnect( 59 static void DispatchOnDisconnect(
59 const ChromeV8ContextSet::ContextSet& context_set, 60 const ChromeV8ContextSet::ContextSet& context_set,
60 int port_id, 61 int port_id,
61 const std::string& error_message, 62 const std::string& error_message,
62 content::RenderView* restrict_to_render_view); 63 content::RenderView* restrict_to_render_view);
63 }; 64 };
64 65
65 } // namespace 66 } // namespace
66 67
67 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ 68 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/media_galleries_custom_bindings.cc ('k') | chrome/renderer/extensions/miscellaneous_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698