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

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

Issue 8103003: Revert 103263 - Merge 101221 - Reland 101111 - Only deliver extension messages to contexts that c... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 years, 2 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) 2011 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_RENDERER_EXTENSION_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 class ExtensionDispatcher; 11 class ExtensionDispatcher;
12 class GURL;
12 class RenderView; 13 class RenderView;
13 14
14 namespace v8 { 15 namespace v8 {
15 class Extension; 16 class Extension;
16 } 17 }
17 18
18 // This class adds extension-related javascript bindings to a renderer. It is 19 // This class adds extension-related javascript bindings to a renderer. It is
19 // used by both web renderers and extension processes. 20 // used by both web renderers and extension processes.
20 class RendererExtensionBindings { 21 class RendererExtensionBindings {
21 public: 22 public:
22 // Name of extension, for dependencies. 23 // Name of extension, for dependencies.
23 static const char* kName; 24 static const char* kName;
24 25
25 // Creates an instance of the extension. 26 // Creates an instance of the extension.
26 static v8::Extension* Get(ExtensionDispatcher* dispatcher); 27 static v8::Extension* Get(ExtensionDispatcher* dispatcher);
27
28 // Delivers a message sent using content script messaging. If
29 // restrict_to_render_view is specified, only contexts in that render view
30 // will receive the message.
31 static void DeliverMessage(int target_port_id, const std::string& message,
32 RenderView* restrict_to_render_view);
33 }; 28 };
34 29
35 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_ 30 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_helper.cc ('k') | chrome/renderer/extensions/renderer_extension_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698