OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/nacl_irt/ppapi_dispatcher.h" | 5 #include "ppapi/nacl_irt/ppapi_dispatcher.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 ManifestService* manifest_service = GetManifestService(); | 206 ManifestService* manifest_service = GetManifestService(); |
207 if (manifest_service) | 207 if (manifest_service) |
208 manifest_service->StartupInitializationComplete(); | 208 manifest_service->StartupInitializationComplete(); |
209 } | 209 } |
210 | 210 |
211 void PpapiDispatcher::OnPluginDispatcherMessageReceived( | 211 void PpapiDispatcher::OnPluginDispatcherMessageReceived( |
212 const IPC::Message& msg) { | 212 const IPC::Message& msg) { |
213 // The first parameter should be a plugin dispatcher ID. | 213 // The first parameter should be a plugin dispatcher ID. |
214 PickleIterator iter(msg); | 214 PickleIterator iter(msg); |
215 uint32 id = 0; | 215 uint32 id = 0; |
216 if (!iter.ReadUInt32(&id)) { | 216 if (!msg.ReadUInt32(&iter, &id)) { |
217 NOTREACHED(); | 217 NOTREACHED(); |
218 return; | 218 return; |
219 } | 219 } |
220 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = | 220 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = |
221 plugin_dispatchers_.find(id); | 221 plugin_dispatchers_.find(id); |
222 if (dispatcher != plugin_dispatchers_.end()) | 222 if (dispatcher != plugin_dispatchers_.end()) |
223 dispatcher->second->OnMessageReceived(msg); | 223 dispatcher->second->OnMessageReceived(msg); |
224 } | 224 } |
225 | 225 |
226 } // namespace ppapi | 226 } // namespace ppapi |
OLD | NEW |