Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 7189045: Make o.o.p. proxy handle PPP_Instance versions 0.4 and 0.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup closing of unnamed namespace Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/host_dispatcher_unittest.cc ('k') | ppapi/proxy/plugin_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) {
brettw 2011/06/29 17:11:29 Whoops!
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/host_dispatcher_unittest.cc ('k') | ppapi/proxy/plugin_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698