| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 GetInterfaceProxy(API_ID_RESOURCE_CREATION)); | 265 GetInterfaceProxy(API_ID_RESOURCE_CREATION)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 // static | 268 // static |
| 269 void PluginDispatcher::DispatchResourceReply( | 269 void PluginDispatcher::DispatchResourceReply( |
| 270 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 270 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
| 271 const IPC::Message& nested_msg) { | 271 const IPC::Message& nested_msg) { |
| 272 Resource* resource = PpapiGlobals::Get()->GetResourceTracker()->GetResource( | 272 Resource* resource = PpapiGlobals::Get()->GetResourceTracker()->GetResource( |
| 273 reply_params.pp_resource()); | 273 reply_params.pp_resource()); |
| 274 if (!resource) { | 274 if (!resource) { |
| 275 NOTREACHED(); | 275 if (reply_params.sequence()) |
| 276 NOTREACHED(); |
| 276 return; | 277 return; |
| 277 } | 278 } |
| 278 resource->OnReplyReceived(reply_params, nested_msg); | 279 resource->OnReplyReceived(reply_params, nested_msg); |
| 279 } | 280 } |
| 280 | 281 |
| 281 void PluginDispatcher::ForceFreeAllInstances() { | 282 void PluginDispatcher::ForceFreeAllInstances() { |
| 282 if (!g_instance_to_dispatcher) | 283 if (!g_instance_to_dispatcher) |
| 283 return; | 284 return; |
| 284 | 285 |
| 285 // Iterating will remove each item from the map, so we need to make a copy | 286 // Iterating will remove each item from the map, so we need to make a copy |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // once they're set. The user will have to restart to get new font prefs | 326 // once they're set. The user will have to restart to get new font prefs |
| 326 // propogated to plugins. | 327 // propogated to plugins. |
| 327 if (!received_preferences_) { | 328 if (!received_preferences_) { |
| 328 received_preferences_ = true; | 329 received_preferences_ = true; |
| 329 preferences_ = prefs; | 330 preferences_ = prefs; |
| 330 } | 331 } |
| 331 } | 332 } |
| 332 | 333 |
| 333 } // namespace proxy | 334 } // namespace proxy |
| 334 } // namespace ppapi | 335 } // namespace ppapi |
| OLD | NEW |