| 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/ppb_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
| 11 #include "ppapi/c/pp_var.h" | 11 #include "ppapi/c/pp_var.h" |
| 12 #include "ppapi/c/ppb_audio_config.h" | 12 #include "ppapi/c/ppb_audio_config.h" |
| 13 #include "ppapi/c/ppb_instance.h" | 13 #include "ppapi/c/ppb_instance.h" |
| 14 #include "ppapi/c/ppb_messaging.h" | 14 #include "ppapi/c/ppb_messaging.h" |
| 15 #include "ppapi/c/ppb_mouse_lock.h" | 15 #include "ppapi/c/ppb_mouse_lock.h" |
| 16 #include "ppapi/c/private/pp_content_decryptor.h" | 16 #include "ppapi/c/private/pp_content_decryptor.h" |
| 17 #include "ppapi/proxy/broker_resource.h" |
| 17 #include "ppapi/proxy/content_decryptor_private_serializer.h" | 18 #include "ppapi/proxy/content_decryptor_private_serializer.h" |
| 18 #include "ppapi/proxy/enter_proxy.h" | 19 #include "ppapi/proxy/enter_proxy.h" |
| 19 #include "ppapi/proxy/flash_clipboard_resource.h" | 20 #include "ppapi/proxy/flash_clipboard_resource.h" |
| 20 #include "ppapi/proxy/flash_fullscreen_resource.h" | 21 #include "ppapi/proxy/flash_fullscreen_resource.h" |
| 21 #include "ppapi/proxy/flash_resource.h" | 22 #include "ppapi/proxy/flash_resource.h" |
| 22 #include "ppapi/proxy/gamepad_resource.h" | 23 #include "ppapi/proxy/gamepad_resource.h" |
| 23 #include "ppapi/proxy/host_dispatcher.h" | 24 #include "ppapi/proxy/host_dispatcher.h" |
| 24 #include "ppapi/proxy/plugin_dispatcher.h" | 25 #include "ppapi/proxy/plugin_dispatcher.h" |
| 25 #include "ppapi/proxy/ppapi_messages.h" | 26 #include "ppapi/proxy/ppapi_messages.h" |
| 26 #include "ppapi/proxy/ppb_flash_proxy.h" | 27 #include "ppapi/proxy/ppb_flash_proxy.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 368 |
| 368 InstanceData::SingletonResourceMap::iterator it = | 369 InstanceData::SingletonResourceMap::iterator it = |
| 369 data->singleton_resources.find(id); | 370 data->singleton_resources.find(id); |
| 370 if (it != data->singleton_resources.end()) | 371 if (it != data->singleton_resources.end()) |
| 371 return it->second.get(); | 372 return it->second.get(); |
| 372 | 373 |
| 373 scoped_refptr<Resource> new_singleton; | 374 scoped_refptr<Resource> new_singleton; |
| 374 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 375 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 375 | 376 |
| 376 switch (id) { | 377 switch (id) { |
| 378 case BROKER_SINGLETON_ID: |
| 379 new_singleton = new BrokerResource(connection, instance); |
| 380 break; |
| 377 case GAMEPAD_SINGLETON_ID: | 381 case GAMEPAD_SINGLETON_ID: |
| 378 new_singleton = new GamepadResource(connection, instance); | 382 new_singleton = new GamepadResource(connection, instance); |
| 379 break; | 383 break; |
| 380 // Flash resources aren't needed for NaCl. | 384 // Flash resources aren't needed for NaCl. |
| 381 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 385 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
| 382 case FLASH_CLIPBOARD_SINGLETON_ID: | 386 case FLASH_CLIPBOARD_SINGLETON_ID: |
| 383 new_singleton = new FlashClipboardResource(connection, instance); | 387 new_singleton = new FlashClipboardResource(connection, instance); |
| 384 break; | 388 break; |
| 385 case FLASH_FULLSCREEN_SINGLETON_ID: | 389 case FLASH_FULLSCREEN_SINGLETON_ID: |
| 386 new_singleton = new FlashFullscreenResource(connection, instance); | 390 new_singleton = new FlashFullscreenResource(connection, instance); |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 PP_Instance instance) { | 1210 PP_Instance instance) { |
| 1207 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1211 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
| 1208 GetInstanceData(instance); | 1212 GetInstanceData(instance); |
| 1209 if (!data) | 1213 if (!data) |
| 1210 return; // Instance was probably deleted. | 1214 return; // Instance was probably deleted. |
| 1211 data->should_do_request_surrounding_text = false; | 1215 data->should_do_request_surrounding_text = false; |
| 1212 } | 1216 } |
| 1213 | 1217 |
| 1214 } // namespace proxy | 1218 } // namespace proxy |
| 1215 } // namespace ppapi | 1219 } // namespace ppapi |
| OLD | NEW |