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_file_resource.h" | 21 #include "ppapi/proxy/flash_file_resource.h" |
21 #include "ppapi/proxy/flash_fullscreen_resource.h" | 22 #include "ppapi/proxy/flash_fullscreen_resource.h" |
22 #include "ppapi/proxy/flash_resource.h" | 23 #include "ppapi/proxy/flash_resource.h" |
23 #include "ppapi/proxy/gamepad_resource.h" | 24 #include "ppapi/proxy/gamepad_resource.h" |
24 #include "ppapi/proxy/host_dispatcher.h" | 25 #include "ppapi/proxy/host_dispatcher.h" |
25 #include "ppapi/proxy/plugin_dispatcher.h" | 26 #include "ppapi/proxy/plugin_dispatcher.h" |
26 #include "ppapi/proxy/ppapi_messages.h" | 27 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 366 |
366 InstanceData::SingletonResourceMap::iterator it = | 367 InstanceData::SingletonResourceMap::iterator it = |
367 data->singleton_resources.find(id); | 368 data->singleton_resources.find(id); |
368 if (it != data->singleton_resources.end()) | 369 if (it != data->singleton_resources.end()) |
369 return it->second.get(); | 370 return it->second.get(); |
370 | 371 |
371 scoped_refptr<Resource> new_singleton; | 372 scoped_refptr<Resource> new_singleton; |
372 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 373 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
373 | 374 |
374 switch (id) { | 375 switch (id) { |
| 376 case BROKER_SINGLETON_ID: |
| 377 new_singleton = new BrokerResource(connection, instance); |
| 378 break; |
375 case GAMEPAD_SINGLETON_ID: | 379 case GAMEPAD_SINGLETON_ID: |
376 new_singleton = new GamepadResource(connection, instance); | 380 new_singleton = new GamepadResource(connection, instance); |
377 break; | 381 break; |
378 // Flash resources aren't needed for NaCl. | 382 // Flash resources aren't needed for NaCl. |
379 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 383 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
380 case FLASH_CLIPBOARD_SINGLETON_ID: | 384 case FLASH_CLIPBOARD_SINGLETON_ID: |
381 new_singleton = new FlashClipboardResource(connection, instance); | 385 new_singleton = new FlashClipboardResource(connection, instance); |
382 break; | 386 break; |
383 case FLASH_FILE_SINGLETON_ID: | 387 case FLASH_FILE_SINGLETON_ID: |
384 new_singleton = new FlashFileResource(connection, instance); | 388 new_singleton = new FlashFileResource(connection, instance); |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 PP_Instance instance) { | 1263 PP_Instance instance) { |
1260 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1264 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1261 GetInstanceData(instance); | 1265 GetInstanceData(instance); |
1262 if (!data) | 1266 if (!data) |
1263 return; // Instance was probably deleted. | 1267 return; // Instance was probably deleted. |
1264 data->should_do_request_surrounding_text = false; | 1268 data->should_do_request_surrounding_text = false; |
1265 } | 1269 } |
1266 | 1270 |
1267 } // namespace proxy | 1271 } // namespace proxy |
1268 } // namespace ppapi | 1272 } // namespace ppapi |
OLD | NEW |