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

Unified Diff: content/browser/message_port_message_filter.h

Issue 785133006: Enable messaging over a navigator.connect initiated channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigator-connect_serviceside
Patch Set: improve comments Created 6 years 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: content/browser/message_port_message_filter.h
diff --git a/content/browser/message_port_message_filter.h b/content/browser/message_port_message_filter.h
index 21bfbb24e17add0058050f49227148fe266d23c6..7acc141c2543417e4efc87fbbf38ef5a89cb0ca5 100644
--- a/content/browser/message_port_message_filter.h
+++ b/content/browser/message_port_message_filter.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_
#include "base/callback.h"
+#include "content/browser/message_port_delegate.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
@@ -13,7 +14,9 @@ namespace content {
// Filter for MessagePort related IPC messages (creating and destroying a
// MessagePort, sending a message via a MessagePort etc).
-class CONTENT_EXPORT MessagePortMessageFilter : public BrowserMessageFilter {
+class CONTENT_EXPORT MessagePortMessageFilter
+ : NON_EXPORTED_BASE(public MessagePortDelegate),
+ public BrowserMessageFilter {
public:
typedef base::Callback<int(void)> NextRoutingIDCallback;
@@ -28,6 +31,12 @@ class CONTENT_EXPORT MessagePortMessageFilter : public BrowserMessageFilter {
int GetNextRoutingID();
+ // MessagePortDelegate implementation.
+ void SendMessage(int route_id,
+ const base::string16& message,
+ const std::vector<int>& sent_message_port_ids) override;
+ void SendMessagesAreQueued(int route_id) override;
+
// Updates message ports registered for |message_port_ids| and returns
// new routing IDs for the updated ports via |new_routing_ids|.
void UpdateMessagePortsWithNewRoutes(

Powered by Google App Engine
This is Rietveld 408576698