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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.h

Issue 1588533002: Never connect a port to the same frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also rename invocation of WillConnectToPort Created 4 years, 11 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 08a3f965dcb3b70585eb70b79776aba218a3284b..28a0d150631e947cb4a384a26dadc91010ef1392 100644
--- a/chrome/browser/extensions/api/messaging/message_service.h
+++ b/chrome/browser/extensions/api/messaging/message_service.h
@@ -63,6 +63,14 @@ class MessageService : public BrowserContextKeyedAPI {
public:
virtual ~MessagePort() {}
+ // Called right before a channel is created for this MessagePort and |port|.
+ // This allows us to ensure that the ports have no RenderFrameHost instances
+ // in common.
+ virtual void RemoveCommonFrames(const MessagePort& port);
+
+ // Check whether the given RenderFrameHost is associated with this port.
+ virtual bool HasFrame(content::RenderFrameHost* rfh) const;
+
// Called right before a port is connected to a channel. If false, the port
// is not used and the channel is closed.
virtual bool IsValidPort() = 0;

Powered by Google App Engine
This is Rietveld 408576698