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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 6901146: Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/renderer/audio_input_message_filter.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // browser process. Messages from the renderer process are sent via a different 51 // browser process. Messages from the renderer process are sent via a different
52 // channel that ends up at Dispatcher::OnMessageReceived. 52 // channel that ends up at Dispatcher::OnMessageReceived.
53 bool PpapiThread::OnMessageReceived(const IPC::Message& msg) { 53 bool PpapiThread::OnMessageReceived(const IPC::Message& msg) {
54 IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg) 54 IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg)
55 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin) 55 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin)
56 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel) 56 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel)
57 IPC_END_MESSAGE_MAP() 57 IPC_END_MESSAGE_MAP()
58 return true; 58 return true;
59 } 59 }
60 60
61 MessageLoop* PpapiThread::GetIPCMessageLoop() { 61 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() {
62 return ChildProcess::current()->io_message_loop(); 62 return ChildProcess::current()->io_message_loop_proxy();
63 } 63 }
64 64
65 base::WaitableEvent* PpapiThread::GetShutdownEvent() { 65 base::WaitableEvent* PpapiThread::GetShutdownEvent() {
66 return ChildProcess::current()->GetShutDownEvent(); 66 return ChildProcess::current()->GetShutDownEvent();
67 } 67 }
68 68
69 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { 69 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() {
70 return &globally_seen_instance_ids_; 70 return &globally_seen_instance_ids_;
71 } 71 }
72 72
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 #if defined(OS_POSIX) 173 #if defined(OS_POSIX)
174 // On POSIX, pass the renderer-side FD. 174 // On POSIX, pass the renderer-side FD.
175 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), 175 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()),
176 true); 176 true);
177 #endif 177 #endif
178 178
179 // From here, the dispatcher will manage its own lifetime according to the 179 // From here, the dispatcher will manage its own lifetime according to the
180 // lifetime of the attached channel. 180 // lifetime of the attached channel.
181 return true; 181 return true;
182 } 182 }
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/renderer/audio_input_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698