diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-14 14:34:09 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-14 14:34:09 +0000 |
commit | d94be6784210477a617804738a4bd8a90fc91c02 (patch) | |
tree | d8551247f29446c72fe45b70c1f0ce1d9f0db67e /content/child/webmessageportchannel_impl.cc | |
parent | b1eff5b6e58841c1b4551a90f853b4f7a59e70f3 (diff) | |
download | chromium_src-d94be6784210477a617804738a4bd8a90fc91c02.zip chromium_src-d94be6784210477a617804738a4bd8a90fc91c02.tar.gz chromium_src-d94be6784210477a617804738a4bd8a90fc91c02.tar.bz2 |
Revert 228448 "Refactoring: Move MessagePort-related IPCs and ha..."
> Refactoring: Move MessagePort-related IPCs and handling them away from Worker-related classes.
>
> MessagePorts can also be used by non-workers.
>
> This is part of a series of changes to fix cross-process MessagePorts. This CL
> contains no functional changes.
>
> BUG=278336
>
> Review URL: https://codereview.chromium.org/25299002
TBR=marja@chromium.org
Review URL: https://codereview.chromium.org/27192002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child/webmessageportchannel_impl.cc')
-rw-r--r-- | content/child/webmessageportchannel_impl.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc index de8866f..ed621ad 100644 --- a/content/child/webmessageportchannel_impl.cc +++ b/content/child/webmessageportchannel_impl.cc @@ -8,7 +8,7 @@ #include "base/message_loop/message_loop_proxy.h" #include "content/child/child_process.h" #include "content/child/child_thread.h" -#include "content/common/message_port_messages.h" +#include "content/common/worker_messages.h" #include "third_party/WebKit/public/platform/WebMessagePortChannelClient.h" #include "third_party/WebKit/public/platform/WebString.h" @@ -53,7 +53,7 @@ WebMessagePortChannelImpl::~WebMessagePortChannelImpl() { } if (message_port_id_ != MSG_ROUTING_NONE) - Send(new MessagePortHostMsg_DestroyMessagePort(message_port_id_)); + Send(new WorkerProcessHostMsg_DestroyMessagePort(message_port_id_)); if (route_id_ != MSG_ROUTING_NONE) ChildThread::current()->RemoveRoute(route_id_); @@ -106,7 +106,7 @@ void WebMessagePortChannelImpl::postMessage( delete channels; } - IPC::Message* msg = new MessagePortHostMsg_PostMessage( + IPC::Message* msg = new WorkerProcessHostMsg_PostMessage( message_port_id_, message, message_port_ids); Send(msg); } @@ -140,7 +140,7 @@ void WebMessagePortChannelImpl::Init() { if (route_id_ == MSG_ROUTING_NONE) { DCHECK(message_port_id_ == MSG_ROUTING_NONE); - Send(new MessagePortHostMsg_CreateMessagePort( + Send(new WorkerProcessHostMsg_CreateMessagePort( &route_id_, &message_port_id_)); } @@ -156,7 +156,7 @@ void WebMessagePortChannelImpl::Entangle( return; } - Send(new MessagePortHostMsg_Entangle( + Send(new WorkerProcessHostMsg_Entangle( message_port_id_, channel->message_port_id())); } @@ -172,7 +172,7 @@ void WebMessagePortChannelImpl::QueueMessages() { // sends us an ack, whose receipt we know means that no more messages are // in-flight. We then send the queued messages to the browser, which prepends // them to the ones it queued and it sends them to the new endpoint. - Send(new MessagePortHostMsg_QueueMessages(message_port_id_)); + Send(new WorkerProcessHostMsg_QueueMessages(message_port_id_)); // The process could potentially go away while we're still waiting for // in-flight messages. Ensure it stays alive. @@ -194,8 +194,8 @@ void WebMessagePortChannelImpl::Send(IPC::Message* message) { bool WebMessagePortChannelImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(WebMessagePortChannelImpl, message) - IPC_MESSAGE_HANDLER(MessagePortMsg_Message, OnMessage) - IPC_MESSAGE_HANDLER(MessagePortMsg_MessagesQueued, OnMessagesQueued) + IPC_MESSAGE_HANDLER(WorkerProcessMsg_Message, OnMessage) + IPC_MESSAGE_HANDLER(WorkerProcessMsg_MessagesQueued, OnMessagesQueued) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -243,7 +243,7 @@ void WebMessagePortChannelImpl::OnMessagesQueued() { } } - Send(new MessagePortHostMsg_SendQueuedMessages( + Send(new WorkerProcessHostMsg_SendQueuedMessages( message_port_id_, queued_messages)); message_port_id_ = MSG_ROUTING_NONE; |