| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (msg.routing_id() == MSG_ROUTING_CONTROL) { | 124 if (msg.routing_id() == MSG_ROUTING_CONTROL) { |
| 125 // Handle some plugin-specific control messages. | 125 // Handle some plugin-specific control messages. |
| 126 bool handled = true; | 126 bool handled = true; |
| 127 IPC_BEGIN_MESSAGE_MAP(PluginDispatcher, msg) | 127 IPC_BEGIN_MESSAGE_MAP(PluginDispatcher, msg) |
| 128 IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface) | 128 IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface) |
| 129 IPC_MESSAGE_HANDLER(PpapiMsg_SetPreferences, OnMsgSetPreferences) | 129 IPC_MESSAGE_HANDLER(PpapiMsg_SetPreferences, OnMsgSetPreferences) |
| 130 IPC_END_MESSAGE_MAP() | 130 IPC_END_MESSAGE_MAP() |
| 131 return handled; | 131 return handled; |
| 132 } | 132 } |
| 133 | 133 |
| 134 if (msg.routing_id() <= 0 && msg.routing_id() >= INTERFACE_ID_COUNT) { | 134 if (msg.routing_id() <= 0 || msg.routing_id() >= INTERFACE_ID_COUNT) { |
| 135 // Host is sending us garbage. Since it's supposed to be trusted, this | 135 // Host is sending us garbage. Since it's supposed to be trusted, this |
| 136 // isn't supposed to happen. Crash here in all builds in case the renderer | 136 // isn't supposed to happen. Crash here in all builds in case the renderer |
| 137 // is compromised. | 137 // is compromised. |
| 138 CHECK(false); | 138 CHECK(false); |
| 139 return true; | 139 return true; |
| 140 } | 140 } |
| 141 | 141 |
| 142 // There are two cases: | 142 // There are two cases: |
| 143 // | 143 // |
| 144 // * The first case is that the host is calling a PPP interface. It will | 144 // * The first case is that the host is calling a PPP interface. It will |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // once they're set. The user will have to restart to get new font prefs | 297 // once they're set. The user will have to restart to get new font prefs |
| 298 // propogated to plugins. | 298 // propogated to plugins. |
| 299 if (!received_preferences_) { | 299 if (!received_preferences_) { |
| 300 received_preferences_ = true; | 300 received_preferences_ = true; |
| 301 preferences_ = prefs; | 301 preferences_ = prefs; |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace proxy | 305 } // namespace proxy |
| 306 } // namespace pp | 306 } // namespace pp |
| OLD | NEW |