| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |