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

Unified Diff: extensions/renderer/messaging_bindings.h

Issue 2540783005: DO NOT COMMIT: Experimentation with ports
Patch Set: Created 4 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: extensions/renderer/messaging_bindings.h
diff --git a/extensions/renderer/messaging_bindings.h b/extensions/renderer/messaging_bindings.h
index 758187e1782580526f83b37fb54613e018bc186b..6e469ed614450b53a64338b4f86bcef3e8f4c8aa 100644
--- a/extensions/renderer/messaging_bindings.h
+++ b/extensions/renderer/messaging_bindings.h
@@ -5,6 +5,7 @@
#ifndef EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_
#define EXTENSIONS_RENDERER_MESSAGING_BINDINGS_H_
+#include <set>
#include <string>
#include "base/macros.h"
@@ -71,6 +72,8 @@ class MessagingBindings : public ObjectBackedNativeHandler {
// Removes the port with the given |local_id|.
void RemovePortWithLocalId(int local_id);
+ bool DidCreatePortWithGlobalId(int global_id) const;
+
base::WeakPtr<MessagingBindings> GetWeakPtr();
private:
@@ -114,6 +117,9 @@ class MessagingBindings : public ObjectBackedNativeHandler {
// initialized and any pending messages are sent, these ports are removed.
PortMap disconnected_ports_;
+ std::set<int> created_local_port_ids_;
+ std::set<int> created_global_port_ids_;
+
// The next available local id for a port.
size_t next_local_id_ = 0;
« no previous file with comments | « chrome/test/data/extensions/api_test/messaging/background_only/test.js ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698