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 "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Notify the renderer process, if necessary. | 196 // Notify the renderer process, if necessary. |
197 ManifestService* manifest_service = GetManifestService(); | 197 ManifestService* manifest_service = GetManifestService(); |
198 if (manifest_service) | 198 if (manifest_service) |
199 manifest_service->StartupInitializationComplete(); | 199 manifest_service->StartupInitializationComplete(); |
200 } | 200 } |
201 | 201 |
202 void PpapiDispatcher::OnPluginDispatcherMessageReceived( | 202 void PpapiDispatcher::OnPluginDispatcherMessageReceived( |
203 const IPC::Message& msg) { | 203 const IPC::Message& msg) { |
204 // The first parameter should be a plugin dispatcher ID. | 204 // The first parameter should be a plugin dispatcher ID. |
205 PickleIterator iter(msg); | 205 base::PickleIterator iter(msg); |
206 uint32 id = 0; | 206 uint32 id = 0; |
207 if (!iter.ReadUInt32(&id)) { | 207 if (!iter.ReadUInt32(&id)) { |
208 NOTREACHED(); | 208 NOTREACHED(); |
209 return; | 209 return; |
210 } | 210 } |
211 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = | 211 std::map<uint32, proxy::PluginDispatcher*>::iterator dispatcher = |
212 plugin_dispatchers_.find(id); | 212 plugin_dispatchers_.find(id); |
213 if (dispatcher != plugin_dispatchers_.end()) | 213 if (dispatcher != plugin_dispatchers_.end()) |
214 dispatcher->second->OnMessageReceived(msg); | 214 dispatcher->second->OnMessageReceived(msg); |
215 } | 215 } |
216 | 216 |
217 } // namespace ppapi | 217 } // namespace ppapi |
OLD | NEW |