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

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

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Created 5 years, 7 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
« no previous file with comments | « ppapi/nacl_irt/ppapi_dispatcher.h ('k') | ppapi/proxy/ppapi_proxy_test.h » ('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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 proxy::PluginGlobals* globals = proxy::PluginGlobals::Get(); 63 proxy::PluginGlobals* globals = proxy::PluginGlobals::Get();
64 // Delay initializing the SyncChannel until after we add filters. This 64 // Delay initializing the SyncChannel until after we add filters. This
65 // ensures that the filters won't miss any messages received by 65 // ensures that the filters won't miss any messages received by
66 // the channel. 66 // the channel.
67 channel_ = 67 channel_ =
68 IPC::SyncChannel::Create(this, GetIPCMessageLoop(), GetShutdownEvent()); 68 IPC::SyncChannel::Create(this, GetIPCTaskRunner(), GetShutdownEvent());
69 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( 69 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter(
70 new ppapi::proxy::PluginMessageFilter( 70 new ppapi::proxy::PluginMessageFilter(
71 NULL, globals->resource_reply_thread_registrar())); 71 NULL, globals->resource_reply_thread_registrar()));
72 channel_->AddFilter(plugin_filter.get()); 72 channel_->AddFilter(plugin_filter.get());
73 globals->RegisterResourceMessageFilters(plugin_filter.get()); 73 globals->RegisterResourceMessageFilters(plugin_filter.get());
74 74
75 channel_->AddFilter( 75 channel_->AddFilter(
76 new tracing::ChildTraceMessageFilter(message_loop_.get())); 76 new tracing::ChildTraceMessageFilter(message_loop_.get()));
77 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true); 77 channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true);
78 } 78 }
79 79
80 base::MessageLoopProxy* PpapiDispatcher::GetIPCMessageLoop() { 80 base::SingleThreadTaskRunner* PpapiDispatcher::GetIPCTaskRunner() {
81 return message_loop_.get(); 81 return message_loop_.get();
82 } 82 }
83 83
84 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() { 84 base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() {
85 return shutdown_event_; 85 return shutdown_event_;
86 } 86 }
87 87
88 IPC::PlatformFileForTransit PpapiDispatcher::ShareHandleWithRemote( 88 IPC::PlatformFileForTransit PpapiDispatcher::ShareHandleWithRemote(
89 base::PlatformFile handle, 89 base::PlatformFile handle,
90 base::ProcessId peer_pid, 90 base::ProcessId peer_pid,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 NOTREACHED(); 222 NOTREACHED();
223 return; 223 return;
224 } 224 }
225 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = 225 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher =
226 plugin_dispatchers_.find(id); 226 plugin_dispatchers_.find(id);
227 if (dispatcher != plugin_dispatchers_.end()) 227 if (dispatcher != plugin_dispatchers_.end())
228 dispatcher->second->OnMessageReceived(msg); 228 dispatcher->second->OnMessageReceived(msg);
229 } 229 }
230 230
231 } // namespace ppapi 231 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/nacl_irt/ppapi_dispatcher.h ('k') | ppapi/proxy/ppapi_proxy_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698