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 "ppapi/proxy/plugin_dispatcher.h" | 5 #include "ppapi/proxy/plugin_dispatcher.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 channel()->AddFilter( | 102 channel()->AddFilter( |
103 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); | 103 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); |
104 return true; | 104 return true; |
105 } | 105 } |
106 | 106 |
107 bool PluginDispatcher::IsPlugin() const { | 107 bool PluginDispatcher::IsPlugin() const { |
108 return true; | 108 return true; |
109 } | 109 } |
110 | 110 |
111 bool PluginDispatcher::Send(IPC::Message* msg) { | 111 bool PluginDispatcher::Send(IPC::Message* msg) { |
| 112 DCHECK(MessageLoop::current()); |
112 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::Send", | 113 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::Send", |
113 "Class", IPC_MESSAGE_ID_CLASS(msg->type()), | 114 "Class", IPC_MESSAGE_ID_CLASS(msg->type()), |
114 "Line", IPC_MESSAGE_ID_LINE(msg->type())); | 115 "Line", IPC_MESSAGE_ID_LINE(msg->type())); |
115 // We always want plugin->renderer messages to arrive in-order. If some sync | 116 // We always want plugin->renderer messages to arrive in-order. If some sync |
116 // and some async messages are send in response to a synchronous | 117 // and some async messages are send in response to a synchronous |
117 // renderer->plugin call, the sync reply will be processed before the async | 118 // renderer->plugin call, the sync reply will be processed before the async |
118 // reply, and everything will be confused. | 119 // reply, and everything will be confused. |
119 // | 120 // |
120 // Allowing all async messages to unblock the renderer means more reentrancy | 121 // Allowing all async messages to unblock the renderer means more reentrancy |
121 // there but gives correct ordering. | 122 // there but gives correct ordering. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // once they're set. The user will have to restart to get new font prefs | 307 // once they're set. The user will have to restart to get new font prefs |
307 // propogated to plugins. | 308 // propogated to plugins. |
308 if (!received_preferences_) { | 309 if (!received_preferences_) { |
309 received_preferences_ = true; | 310 received_preferences_ = true; |
310 preferences_ = prefs; | 311 preferences_ = prefs; |
311 } | 312 } |
312 } | 313 } |
313 | 314 |
314 } // namespace proxy | 315 } // namespace proxy |
315 } // namespace ppapi | 316 } // namespace ppapi |
OLD | NEW |