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

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

Issue 14301016: Fix a couple of bugs relating to sending Tab info with chrome.runtime.connect and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add key to app1/manifest.json Created 7 years, 8 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"
11 11
12 namespace base {
13 class DictionaryValue;
14 }
12 15
13 namespace content { 16 namespace content {
14 class RenderView; 17 class RenderView;
15 } 18 }
16 19
17 namespace v8 { 20 namespace v8 {
18 class Extension; 21 class Extension;
19 } 22 }
20 23
21 namespace extensions { 24 namespace extensions {
(...skipping 11 matching lines...) Expand all
33 static ChromeV8Extension* Get(Dispatcher* dispatcher, 36 static ChromeV8Extension* Get(Dispatcher* dispatcher,
34 v8::Handle<v8::Context> context); 37 v8::Handle<v8::Context> context);
35 38
36 // Dispatches the Port.onConnect content script messaging event to some 39 // Dispatches the Port.onConnect content script messaging event to some
37 // contexts in |contexts|. If |restrict_to_render_view| is specified, only 40 // contexts in |contexts|. If |restrict_to_render_view| is specified, only
38 // contexts in that render view will receive the message. 41 // contexts in that render view will receive the message.
39 static void DispatchOnConnect( 42 static void DispatchOnConnect(
40 const ChromeV8ContextSet::ContextSet& contexts, 43 const ChromeV8ContextSet::ContextSet& contexts,
41 int target_port_id, 44 int target_port_id,
42 const std::string& channel_name, 45 const std::string& channel_name,
43 const std::string& tab_json, 46 const base::DictionaryValue& source_tab,
44 const std::string& source_extension_id, 47 const std::string& source_extension_id,
45 const std::string& target_extension_id, 48 const std::string& target_extension_id,
49 const GURL& source_url,
46 content::RenderView* restrict_to_render_view); 50 content::RenderView* restrict_to_render_view);
47 51
48 // Delivers a message sent using content script messaging to some of the 52 // Delivers a message sent using content script messaging to some of the
49 // contexts in |bindings_context_set|. If |restrict_to_render_view| is 53 // contexts in |bindings_context_set|. If |restrict_to_render_view| is
50 // specified, only contexts in that render view will receive the message. 54 // specified, only contexts in that render view will receive the message.
51 static void DeliverMessage( 55 static void DeliverMessage(
52 const ChromeV8ContextSet::ContextSet& context_set, 56 const ChromeV8ContextSet::ContextSet& context_set,
53 int target_port_id, 57 int target_port_id,
54 const std::string& message, 58 const std::string& message,
55 content::RenderView* restrict_to_render_view); 59 content::RenderView* restrict_to_render_view);
56 60
57 // Dispatches the Port.onDisconnect event in response to the channel being 61 // Dispatches the Port.onDisconnect event in response to the channel being
58 // closed. 62 // closed.
59 static void DispatchOnDisconnect( 63 static void DispatchOnDisconnect(
60 const ChromeV8ContextSet::ContextSet& context_set, 64 const ChromeV8ContextSet::ContextSet& context_set,
61 int port_id, 65 int port_id,
62 const std::string& error_message, 66 const std::string& error_message,
63 content::RenderView* restrict_to_render_view); 67 content::RenderView* restrict_to_render_view);
64 }; 68 };
65 69
66 } // namespace 70 } // namespace
67 71
68 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_ 72 #endif // CHROME_RENDERER_EXTENSIONS_MISCELLANEOUS_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_helper.cc ('k') | chrome/renderer/extensions/miscellaneous_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698