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

Side by Side Diff: ppapi/nacl_irt/ppapi_dispatcher.cc

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/proxy/proxy_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/nacl_irt/ppapi_dispatcher.h" 5 #include "ppapi/nacl_irt/ppapi_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #if defined(IPC_MESSAGE_LOG_ENABLED) 56 #if defined(IPC_MESSAGE_LOG_ENABLED)
57 IPC::Logging::set_log_function_map(&g_log_function_mapping); 57 IPC::Logging::set_log_function_map(&g_log_function_mapping);
58 #endif 58 #endif
59 59
60 IPC::ChannelHandle channel_handle( 60 IPC::ChannelHandle channel_handle(
61 "NaCl IPC", base::FileDescriptor(browser_ipc_fd, false)); 61 "NaCl IPC", base::FileDescriptor(browser_ipc_fd, false));
62 62
63 // Delay initializing the SyncChannel until after we add filters. This 63 // Delay initializing the SyncChannel until after we add filters. This
64 // ensures that the filters won't miss any messages received by 64 // ensures that the filters won't miss any messages received by
65 // the channel. 65 // the channel.
66 channel_.reset(new IPC::SyncChannel( 66 channel_ =
67 this, GetIPCMessageLoop(), GetShutdownEvent())); 67 IPC::SyncChannel::Create(this, GetIPCMessageLoop(), GetShutdownEvent());
68 channel_->AddFilter(new proxy::PluginMessageFilter( 68 channel_->AddFilter(new proxy::PluginMessageFilter(
69 NULL, proxy::PluginGlobals::Get()->resource_reply_thread_registrar())); 69 NULL, proxy::PluginGlobals::Get()->resource_reply_thread_registrar()));
70 channel_->AddFilter( 70 channel_->AddFilter(
71 new tracing::ChildTraceMessageFilter(message_loop_.get())); 71 new tracing::ChildTraceMessageFilter(message_loop_.get()));
72 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true); 72 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true);
73 } 73 }
74 74
75 base::MessageLoopProxy* PpapiDispatcher::GetIPCMessageLoop() { 75 base::MessageLoopProxy* PpapiDispatcher::GetIPCMessageLoop() {
76 return message_loop_.get(); 76 return message_loop_.get();
77 } 77 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 NOTREACHED(); 217 NOTREACHED();
218 return; 218 return;
219 } 219 }
220 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = 220 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher =
221 plugin_dispatchers_.find(id); 221 plugin_dispatchers_.find(id);
222 if (dispatcher != plugin_dispatchers_.end()) 222 if (dispatcher != plugin_dispatchers_.end())
223 dispatcher->second->OnMessageReceived(msg); 223 dispatcher->second->OnMessageReceived(msg);
224 } 224 }
225 225
226 } // namespace ppapi 226 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/proxy/proxy_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698