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

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

Issue 10821133: Move c/r/extensions/* into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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
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"
11 11
12 class ChromeV8Extension;
13 class ExtensionDispatcher;
14 12
15 namespace content { 13 namespace content {
16 class RenderView; 14 class RenderView;
17 } 15 }
18 16
19 namespace v8 { 17 namespace v8 {
20 class Extension; 18 class Extension;
21 } 19 }
22 20
23 namespace extensions { 21 namespace extensions {
22 class ChromeV8Extension;
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(ExtensionDispatcher* dispatcher); 33 static ChromeV8Extension* Get(Dispatcher* dispatcher);
34 34
35 // Dispatches the Port.onConnect content script messaging event to some 35 // Dispatches the Port.onConnect content script messaging event to some
36 // contexts in |contexts|. If |restrict_to_render_view| is specified, only 36 // contexts in |contexts|. If |restrict_to_render_view| is specified, only
37 // contexts in that render view will receive the message. 37 // contexts in that render view will receive the message.
38 static void DispatchOnConnect( 38 static void DispatchOnConnect(
39 const ChromeV8ContextSet::ContextSet& contexts, 39 const ChromeV8ContextSet::ContextSet& contexts,
40 int target_port_id, 40 int target_port_id,
41 const std::string& channel_name, 41 const std::string& channel_name,
42 const std::string& tab_json, 42 const std::string& tab_json,
43 const std::string& source_extension_id, 43 const std::string& source_extension_id,
(...skipping 14 matching lines...) Expand all
58 static void DispatchOnDisconnect( 58 static void DispatchOnDisconnect(
59 const ChromeV8ContextSet::ContextSet& context_set, 59 const ChromeV8ContextSet::ContextSet& context_set,
60 int port_id, 60 int port_id,
61 bool connection_error, 61 bool connection_error,
62 content::RenderView* restrict_to_render_view); 62 content::RenderView* restrict_to_render_view);
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
67 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ 67 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/json_schema_unittest.cc ('k') | chrome/renderer/extensions/miscellaneous_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698