| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 ppapi::proxy::PluginGlobals::Get()->ResetPluginProxyDelegate(); | 144 ppapi::proxy::PluginGlobals::Get()->ResetPluginProxyDelegate(); |
| 145 if (plugin_entry_points_.shutdown_module) | 145 if (plugin_entry_points_.shutdown_module) |
| 146 plugin_entry_points_.shutdown_module(); | 146 plugin_entry_points_.shutdown_module(); |
| 147 blink_platform_impl_->Shutdown(); | 147 blink_platform_impl_->Shutdown(); |
| 148 blink::Platform::shutdown(); | 148 blink::Platform::shutdown(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool PpapiThread::Send(IPC::Message* msg) { | 151 bool PpapiThread::Send(IPC::Message* msg) { |
| 152 // Allow access from multiple threads. | 152 // Allow access from multiple threads. |
| 153 if (message_loop()->task_runner()->BelongsToCurrentThread()) | 153 if (main_task_runner()->BelongsToCurrentThread()) |
| 154 return ChildThreadImpl::Send(msg); | 154 return ChildThreadImpl::Send(msg); |
| 155 | 155 |
| 156 return sync_message_filter()->Send(msg); | 156 return sync_message_filter()->Send(msg); |
| 157 } | 157 } |
| 158 | 158 |
| 159 // Note that this function is called only for messages from the channel to the | 159 // Note that this function is called only for messages from the channel to the |
| 160 // browser process. Messages from the renderer process are sent via a different | 160 // browser process. Messages from the renderer process are sent via a different |
| 161 // channel that ends up at Dispatcher::OnMessageReceived. | 161 // channel that ends up at Dispatcher::OnMessageReceived. |
| 162 bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) { | 162 bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 163 bool handled = true; | 163 bool handled = true; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 GetHistogramName(is_broker_, "LoadTime", path), | 588 GetHistogramName(is_broker_, "LoadTime", path), |
| 589 base::TimeDelta::FromMilliseconds(1), | 589 base::TimeDelta::FromMilliseconds(1), |
| 590 base::TimeDelta::FromSeconds(10), | 590 base::TimeDelta::FromSeconds(10), |
| 591 50, | 591 50, |
| 592 base::HistogramBase::kUmaTargetedHistogramFlag); | 592 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 593 | 593 |
| 594 histogram->AddTime(load_time); | 594 histogram->AddTime(load_time); |
| 595 } | 595 } |
| 596 | 596 |
| 597 } // namespace content | 597 } // namespace content |
| OLD | NEW |