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

Unified Diff: content/renderer/shared_worker/embedded_shared_worker_stub.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Address feedback from yusuf Created 3 years, 10 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: content/renderer/shared_worker/embedded_shared_worker_stub.h
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.h b/content/renderer/shared_worker/embedded_shared_worker_stub.h
index 3f0c25075fe7015a1d641aba209ef0717da4b079..30fca230157ce79c4f561e15b08afe05be91c5dd 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.h
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.h
@@ -28,6 +28,7 @@ class WebWorkerContentSettingsClientProxy;
}
namespace content {
+class MessagePort;
class SharedWorkerDevToolsAgent;
class WebApplicationCacheHostImpl;
class WebMessagePortChannelImpl;
@@ -87,9 +88,11 @@ class EmbeddedSharedWorkerStub : public IPC::Listener,
bool Send(IPC::Message* message);
// WebSharedWorker will own |channel|.
- void ConnectToChannel(WebMessagePortChannelImpl* channel);
+ void ConnectToChannel(int connection_request_id,
+ std::unique_ptr<WebMessagePortChannelImpl> channel);
- void OnConnect(int sent_message_port_id, int routing_id);
+ void OnConnect(int connection_request_id,
+ const MessagePort& sent_message_port);
void OnTerminateWorkerContext();
int route_id_;
@@ -99,8 +102,9 @@ class EmbeddedSharedWorkerStub : public IPC::Listener,
blink::WebSharedWorker* impl_ = nullptr;
std::unique_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_;
- typedef std::vector<WebMessagePortChannelImpl*> PendingChannelList;
- PendingChannelList pending_channels_;
+ typedef std::pair<int /* connection_request_id */,
+ std::unique_ptr<WebMessagePortChannelImpl>> PendingChannel;
kinuko 2017/02/08 09:45:06 nit: using PendingChannel = std::pair<...>
darin (slow to review) 2017/02/08 17:09:17 Done.
+ std::vector<PendingChannel> pending_channels_;
ScopedChildProcessReference process_ref_;
WebApplicationCacheHostImpl* app_cache_host_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698