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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/messaging/message_service.h
diff --git a/chrome/browser/extensions/api/messaging/message_service.h b/chrome/browser/extensions/api/messaging/message_service.h
index 8786ef184996a98061ffa9ab5029debcb7c07961..adeb060f9198b1a375ab46a00553288e1aadff99 100644
--- a/chrome/browser/extensions/api/messaging/message_service.h
+++ b/chrome/browser/extensions/api/messaging/message_service.h
@@ -16,14 +16,20 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class GURL;
class Profile;
+namespace base {
+class DictionaryValue;
+}
+
namespace content {
class RenderProcessHost;
class WebContents;
}
namespace extensions {
+class Extension;
class ExtensionHost;
class LazyBackgroundTaskQueue;
@@ -63,9 +69,10 @@ class MessageService : public content::NotificationObserver,
// Notify the port that the channel has been opened.
virtual void DispatchOnConnect(int dest_port_id,
const std::string& channel_name,
- const std::string& tab_json,
+ const base::DictionaryValue& source_tab,
const std::string& source_extension_id,
- const std::string& target_extension_id) {}
+ const std::string& target_extension_id,
+ const GURL& source_url) {}
// Notify the port that the channel has been closed. If |error_message| is
// non-empty, it indicates an error occurred while opening the connection.
@@ -105,6 +112,7 @@ class MessageService : public content::NotificationObserver,
int source_process_id, int source_routing_id, int receiver_port_id,
const std::string& source_extension_id,
const std::string& target_extension_id,
+ const GURL& source_url,
const std::string& channel_name);
// Same as above, but opens a channel to the tab with the given ID. Messages
@@ -172,6 +180,7 @@ class MessageService : public content::NotificationObserver,
// to open a channel. Returns true if a task was queued.
// Takes ownership of |params| if true is returned.
bool MaybeAddPendingOpenChannelTask(Profile* profile,
+ const Extension* extension,
OpenChannelParams* params);
// Callbacks for LazyBackgroundTaskQueue tasks. The queue passes in an

Powered by Google App Engine
This is Rietveld 408576698