OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 168 } |
169 | 169 |
170 void PpapiThread::OnChannelConnected(int32 peer_pid) { | 170 void PpapiThread::OnChannelConnected(int32 peer_pid) { |
171 ChildThreadImpl::OnChannelConnected(peer_pid); | 171 ChildThreadImpl::OnChannelConnected(peer_pid); |
172 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
173 if (is_broker_) | 173 if (is_broker_) |
174 peer_handle_.Set(::OpenProcess(PROCESS_DUP_HANDLE, FALSE, peer_pid)); | 174 peer_handle_.Set(::OpenProcess(PROCESS_DUP_HANDLE, FALSE, peer_pid)); |
175 #endif | 175 #endif |
176 } | 176 } |
177 | 177 |
178 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { | 178 base::SingleThreadTaskRunner* PpapiThread::GetIPCTaskRunner() { |
179 return ChildProcess::current()->io_message_loop_proxy(); | 179 return ChildProcess::current()->io_task_runner(); |
180 } | 180 } |
181 | 181 |
182 base::WaitableEvent* PpapiThread::GetShutdownEvent() { | 182 base::WaitableEvent* PpapiThread::GetShutdownEvent() { |
183 return ChildProcess::current()->GetShutDownEvent(); | 183 return ChildProcess::current()->GetShutDownEvent(); |
184 } | 184 } |
185 | 185 |
186 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( | 186 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( |
187 base::PlatformFile handle, | 187 base::PlatformFile handle, |
188 base::ProcessId peer_pid, | 188 base::ProcessId peer_pid, |
189 bool should_close_source) { | 189 bool should_close_source) { |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + | 557 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + |
558 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); | 558 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); |
559 | 559 |
560 // For sparse histograms, we can use the macro, as it does not incorporate a | 560 // For sparse histograms, we can use the macro, as it does not incorporate a |
561 // static. | 561 // static. |
562 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); | 562 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); |
563 #endif | 563 #endif |
564 } | 564 } |
565 | 565 |
566 } // namespace content | 566 } // namespace content |
OLD | NEW |