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

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

Issue 9657026: Revert 125801 - Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/renderer/extensions/chrome_v8_context_set.h" 11 #include "chrome/renderer/extensions/chrome_v8_context_set.h"
12 12
13 class ChromeV8Extension;
14 class ExtensionDispatcher; 13 class ExtensionDispatcher;
15 14
16 namespace content { 15 namespace content {
17 class RenderView; 16 class RenderView;
18 } 17 }
19 18
20 namespace v8 { 19 namespace v8 {
21 class Extension; 20 class Extension;
22 } 21 }
23 22
24 namespace extensions { 23 namespace extensions {
25 24
26 // Manually implements some random JavaScript bindings for the extension system. 25 // Manually implements some random JavaScript bindings for the extension system.
27 // 26 //
28 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings. 27 // TODO(aa): This should all get re-implemented using SchemaGeneratedBindings.
29 // 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
30 // its own class. 29 // its own class.
31 class MiscellaneousBindings { 30 class MiscellaneousBindings {
32 public: 31 public:
33 // Creates an instance of the extension. 32 // Creates an instance of the extension.
34 static ChromeV8Extension* Get(ExtensionDispatcher* dispatcher); 33 static v8::Extension* Get(ExtensionDispatcher* dispatcher);
35 34
36 // Delivers a message sent using content script messaging to some of the 35 // Delivers a message sent using content script messaging to some of the
37 // contexts in |bindings_context_set|. If |restrict_to_render_view| is 36 // contexts in |bindings_context_set|. If |restrict_to_render_view| is
38 // specified, only contexts in that render view will receive the message. 37 // specified, only contexts in that render view will receive the message.
39 static void DeliverMessage( 38 static void DeliverMessage(
40 const ChromeV8ContextSet::ContextSet& context_set, 39 const ChromeV8ContextSet::ContextSet& context_set,
41 int target_port_id, 40 int target_port_id,
42 const std::string& message, 41 const std::string& message,
43 content::RenderView* restrict_to_render_view); 42 content::RenderView* restrict_to_render_view);
44 }; 43 };
45 44
46 } // namespace 45 } // namespace
47 46
48 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ 47 #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