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

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

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
7 #pragma once
8
9 #include <string>
10
11 #include "chrome/renderer/extensions/chrome_v8_context_set.h"
12
13 class ExtensionDispatcher;
14
15 namespace content {
16 class RenderView;
17 }
18
19 namespace v8 {
20 class Extension;
21 }
22
23 // This class adds extension-related javascript bindings to a renderer. It is
24 // used by both web renderers and extension processes.
25 class RendererExtensionBindings {
26 public:
27 // Creates an instance of the extension.
28 static v8::Extension* Get(ExtensionDispatcher* dispatcher);
29
30 // Delivers a message sent using content script messaging to some of the
31 // contexts in |bindings_context_set|. If |restrict_to_render_view| is
32 // specified, only contexts in that render view will receive the message.
33 static void DeliverMessage(
34 const ChromeV8ContextSet::ContextSet& context_set,
35 int target_port_id,
36 const std::string& message,
37 content::RenderView* restrict_to_render_view);
38 };
39
40 #endif // CHROME_RENDERER_EXTENSIONS_RENDERER_EXTENSION_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/miscellaneous_bindings.cc ('k') | chrome/renderer/extensions/renderer_extension_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698