| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 should_do_request_surrounding_text(false) { | 53 should_do_request_surrounding_text(false) { |
| 54 } | 54 } |
| 55 | 55 |
| 56 InstanceData::~InstanceData() { | 56 InstanceData::~InstanceData() { |
| 57 // Run any pending mouse lock callback to prevent leaks. | 57 // Run any pending mouse lock callback to prevent leaks. |
| 58 if (mouse_lock_callback) | 58 if (mouse_lock_callback) |
| 59 mouse_lock_callback->Abort(); | 59 mouse_lock_callback->Abort(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 PluginDispatcher::PluginDispatcher(PP_GetInterface_Func get_interface, | 62 PluginDispatcher::PluginDispatcher(PP_GetInterface_Func get_interface, |
| 63 const PpapiPermissions& permissions, |
| 63 bool incognito) | 64 bool incognito) |
| 64 : Dispatcher(get_interface), | 65 : Dispatcher(get_interface, permissions), |
| 65 plugin_delegate_(NULL), | 66 plugin_delegate_(NULL), |
| 66 received_preferences_(false), | 67 received_preferences_(false), |
| 67 plugin_dispatcher_id_(0), | 68 plugin_dispatcher_id_(0), |
| 68 incognito_(incognito) { | 69 incognito_(incognito) { |
| 69 SetSerializationRules(new PluginVarSerializationRules(AsWeakPtr())); | 70 SetSerializationRules(new PluginVarSerializationRules(AsWeakPtr())); |
| 70 | 71 |
| 71 if (!g_live_dispatchers) | 72 if (!g_live_dispatchers) |
| 72 g_live_dispatchers = new DispatcherSet; | 73 g_live_dispatchers = new DispatcherSet; |
| 73 g_live_dispatchers->insert(this); | 74 g_live_dispatchers->insert(this); |
| 74 } | 75 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // once they're set. The user will have to restart to get new font prefs | 325 // once they're set. The user will have to restart to get new font prefs |
| 325 // propogated to plugins. | 326 // propogated to plugins. |
| 326 if (!received_preferences_) { | 327 if (!received_preferences_) { |
| 327 received_preferences_ = true; | 328 received_preferences_ = true; |
| 328 preferences_ = prefs; | 329 preferences_ = prefs; |
| 329 } | 330 } |
| 330 } | 331 } |
| 331 | 332 |
| 332 } // namespace proxy | 333 } // namespace proxy |
| 333 } // namespace ppapi | 334 } // namespace ppapi |
| OLD | NEW |