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 "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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::OnMessageReceived", | 237 TRACE_EVENT2("ppapi proxy", "PluginDispatcher::OnMessageReceived", |
238 "Class", IPC_MESSAGE_ID_CLASS(msg.type()), | 238 "Class", IPC_MESSAGE_ID_CLASS(msg.type()), |
239 "Line", IPC_MESSAGE_ID_LINE(msg.type())); | 239 "Line", IPC_MESSAGE_ID_LINE(msg.type())); |
240 | 240 |
241 if (msg.routing_id() == MSG_ROUTING_CONTROL) { | 241 if (msg.routing_id() == MSG_ROUTING_CONTROL) { |
242 // Handle some plugin-specific control messages. | 242 // Handle some plugin-specific control messages. |
243 bool handled = true; | 243 bool handled = true; |
244 IPC_BEGIN_MESSAGE_MAP(PluginDispatcher, msg) | 244 IPC_BEGIN_MESSAGE_MAP(PluginDispatcher, msg) |
245 IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface) | 245 IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface) |
246 IPC_MESSAGE_HANDLER(PpapiMsg_SetPreferences, OnMsgSetPreferences) | 246 IPC_MESSAGE_HANDLER(PpapiMsg_SetPreferences, OnMsgSetPreferences) |
247 IPC_MESSAGE_UNHANDLED(handled = false); | 247 IPC_MESSAGE_UNHANDLED(handled = false) |
248 IPC_END_MESSAGE_MAP() | 248 IPC_END_MESSAGE_MAP() |
249 if (handled) | 249 if (handled) |
250 return true; | 250 return true; |
251 } | 251 } |
252 return Dispatcher::OnMessageReceived(msg); | 252 return Dispatcher::OnMessageReceived(msg); |
253 } | 253 } |
254 | 254 |
255 void PluginDispatcher::OnChannelError() { | 255 void PluginDispatcher::OnChannelError() { |
256 Dispatcher::OnChannelError(); | 256 Dispatcher::OnChannelError(); |
257 | 257 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 // once they're set. The user will have to restart to get new font prefs | 339 // once they're set. The user will have to restart to get new font prefs |
340 // propogated to plugins. | 340 // propogated to plugins. |
341 if (!received_preferences_) { | 341 if (!received_preferences_) { |
342 received_preferences_ = true; | 342 received_preferences_ = true; |
343 preferences_ = prefs; | 343 preferences_ = prefs; |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 } // namespace proxy | 347 } // namespace proxy |
348 } // namespace ppapi | 348 } // namespace ppapi |
OLD | NEW |