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

Unified Diff: chrome/browser/extensions/extension_message_service.h

Issue 174226: Extension ports devtools remote service.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_message_service.h
===================================================================
--- chrome/browser/extensions/extension_message_service.h (revision 23787)
+++ chrome/browser/extensions/extension_message_service.h (working copy)
@@ -19,6 +19,7 @@
class Profile;
class RenderProcessHost;
class ResourceMessageFilter;
+class TabContents;
class URLRequestContext;
// This class manages message and event passing between renderer processes.
@@ -82,15 +83,28 @@
void DispatchEventToRenderers(
const std::string& event_name, const std::string& event_args);
- // Given an extension's ID, opens a channel between the given automation
- // "port" and that extension. Returns a channel ID to be used for posting
- // messages between the processes, or -1 if the extension doesn't exist.
- int OpenAutomationChannelToExtension(int source_process_id,
- int routing_id,
- const std::string& extension_id,
- const std::string& channel_name,
- IPC::Message::Sender* source);
+ // Given an extension ID, opens a channel between the given
+ // automation "port" or DevTools service and that extension. the
+ // channel will be open to the extension process hosting the
+ // background page and tool strip.
+ //
+ // Returns a port ID to be used for posting messages between the
+ // processes, or -1 if the extension doesn't exist.
+ int OpenSpecialChannelToExtension(
+ const std::string& extension_id, const std::string& channel_name,
+ IPC::Message::Sender* source);
+ // Given an extension ID, opens a channel between the given DevTools
+ // service and the content script for that extension running in the
+ // designated tab.
+ //
+ // Returns a port ID identifying the DevTools end of the channel, to
+ // be used for posting messages. May return -1 on failure, although
+ // the code doesn't detect whether the extension actually exists.
+ int OpenSpecialChannelToTab(
+ const std::string& extension_id, const std::string& channel_name,
+ TabContents* target_tab_contents, IPC::Message::Sender* source);
+
// --- IO thread only:
// Given an extension's ID, opens a channel between the given renderer "port"
@@ -137,11 +151,11 @@
int tab_id, const std::string& extension_id,
const std::string& channel_name);
- // Common between OpenChannelOnUIThread and OpenAutomationChannelToExtension.
+ // Common between OpenChannelOnUIThread and OpenSpecialChannelToExtension.
bool OpenChannelOnUIThreadImpl(
- IPC::Message::Sender* source, int source_process_id, int source_routing_id,
- const MessagePort& receiver, int receiver_port_id,
- const std::string& extension_id, const std::string& channel_name);
+ IPC::Message::Sender* source, TabContents* source_contents,
+ const MessagePort& receiver, int receiver_port_id,
+ const std::string& extension_id, const std::string& channel_name);
// NotificationObserver interface.
void Observe(NotificationType type,
« no previous file with comments | « chrome/browser/debugger/extension_ports_remote_service.cc ('k') | chrome/browser/extensions/extension_message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698