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/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 WebKit::shutdown(); | 122 WebKit::shutdown(); |
123 | 123 |
124 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
125 if (permissions_.HasPermission(ppapi::PERMISSION_FLASH)) | 125 if (permissions_.HasPermission(ppapi::PERMISSION_FLASH)) |
126 base::win::SetShouldCrashOnProcessDetach(false); | 126 base::win::SetShouldCrashOnProcessDetach(false); |
127 #endif | 127 #endif |
128 } | 128 } |
129 | 129 |
130 bool PpapiThread::Send(IPC::Message* msg) { | 130 bool PpapiThread::Send(IPC::Message* msg) { |
131 // Allow access from multiple threads. | 131 // Allow access from multiple threads. |
132 if (MessageLoop::current() == message_loop()) | 132 if (base::MessageLoop::current() == message_loop()) |
133 return ChildThread::Send(msg); | 133 return ChildThread::Send(msg); |
134 | 134 |
135 return sync_message_filter()->Send(msg); | 135 return sync_message_filter()->Send(msg); |
136 } | 136 } |
137 | 137 |
138 // Note that this function is called only for messages from the channel to the | 138 // Note that this function is called only for messages from the channel to the |
139 // browser process. Messages from the renderer process are sent via a different | 139 // browser process. Messages from the renderer process are sent via a different |
140 // channel that ends up at Dispatcher::OnMessageReceived. | 140 // channel that ends up at Dispatcher::OnMessageReceived. |
141 bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) { | 141 bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) { |
142 bool handled = true; | 142 bool handled = true; |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 histogram_name.str(), | 494 histogram_name.str(), |
495 1, | 495 1, |
496 LOAD_RESULT_MAX, | 496 LOAD_RESULT_MAX, |
497 LOAD_RESULT_MAX + 1, | 497 LOAD_RESULT_MAX + 1, |
498 base::HistogramBase::kUmaTargetedHistogramFlag); | 498 base::HistogramBase::kUmaTargetedHistogramFlag); |
499 | 499 |
500 histogram->Add(result); | 500 histogram->Add(result); |
501 } | 501 } |
502 | 502 |
503 } // namespace content | 503 } // namespace content |
OLD | NEW |