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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 channel()->AddFilter( | 97 channel()->AddFilter( |
98 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); | 98 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); |
99 return true; | 99 return true; |
100 } | 100 } |
101 | 101 |
102 bool PluginDispatcher::IsPlugin() const { | 102 bool PluginDispatcher::IsPlugin() const { |
103 return true; | 103 return true; |
104 } | 104 } |
105 | 105 |
106 bool PluginDispatcher::Send(IPC::Message* msg) { | 106 bool PluginDispatcher::Send(IPC::Message* msg) { |
107 DCHECK(MessageLoop::current()); | |
dmichael (off chromium)
2011/08/16 19:42:26
Note: I didn't see anything in Send that required
| |
108 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::Send", | 107 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::Send", |
109 "Class", IPC_MESSAGE_ID_CLASS(msg->type()), | 108 "Class", IPC_MESSAGE_ID_CLASS(msg->type()), |
110 "Line", IPC_MESSAGE_ID_LINE(msg->type())); | 109 "Line", IPC_MESSAGE_ID_LINE(msg->type())); |
111 // We always want plugin->renderer messages to arrive in-order. If some sync | 110 // We always want plugin->renderer messages to arrive in-order. If some sync |
112 // and some async messages are send in response to a synchronous | 111 // and some async messages are send in response to a synchronous |
113 // renderer->plugin call, the sync reply will be processed before the async | 112 // renderer->plugin call, the sync reply will be processed before the async |
114 // reply, and everything will be confused. | 113 // reply, and everything will be confused. |
115 // | 114 // |
116 // Allowing all async messages to unblock the renderer means more reentrancy | 115 // Allowing all async messages to unblock the renderer means more reentrancy |
117 // there but gives correct ordering. | 116 // there but gives correct ordering. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 // once they're set. The user will have to restart to get new font prefs | 302 // once they're set. The user will have to restart to get new font prefs |
304 // propogated to plugins. | 303 // propogated to plugins. |
305 if (!received_preferences_) { | 304 if (!received_preferences_) { |
306 received_preferences_ = true; | 305 received_preferences_ = true; |
307 preferences_ = prefs; | 306 preferences_ = prefs; |
308 } | 307 } |
309 } | 308 } |
310 | 309 |
311 } // namespace proxy | 310 } // namespace proxy |
312 } // namespace pp | 311 } // namespace pp |
OLD | NEW |