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/broker_resource.h" |
18 #include "ppapi/proxy/browser_font_singleton_resource.h" | 18 #include "ppapi/proxy/browser_font_singleton_resource.h" |
19 #include "ppapi/proxy/content_decryptor_private_serializer.h" | 19 #include "ppapi/proxy/content_decryptor_private_serializer.h" |
20 #include "ppapi/proxy/enter_proxy.h" | 20 #include "ppapi/proxy/enter_proxy.h" |
21 #include "ppapi/proxy/extensions_common_resource.h" | 21 #include "ppapi/proxy/extensions_common_resource.h" |
| 22 #include "ppapi/proxy/file_mapping_resource.h" |
22 #include "ppapi/proxy/flash_clipboard_resource.h" | 23 #include "ppapi/proxy/flash_clipboard_resource.h" |
23 #include "ppapi/proxy/flash_file_resource.h" | 24 #include "ppapi/proxy/flash_file_resource.h" |
24 #include "ppapi/proxy/flash_fullscreen_resource.h" | 25 #include "ppapi/proxy/flash_fullscreen_resource.h" |
25 #include "ppapi/proxy/flash_resource.h" | 26 #include "ppapi/proxy/flash_resource.h" |
26 #include "ppapi/proxy/gamepad_resource.h" | 27 #include "ppapi/proxy/gamepad_resource.h" |
27 #include "ppapi/proxy/host_dispatcher.h" | 28 #include "ppapi/proxy/host_dispatcher.h" |
28 #include "ppapi/proxy/isolated_file_system_private_resource.h" | 29 #include "ppapi/proxy/isolated_file_system_private_resource.h" |
29 #include "ppapi/proxy/network_proxy_resource.h" | 30 #include "ppapi/proxy/network_proxy_resource.h" |
30 #include "ppapi/proxy/pdf_resource.h" | 31 #include "ppapi/proxy/pdf_resource.h" |
31 #include "ppapi/proxy/plugin_dispatcher.h" | 32 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 scoped_refptr<Resource> new_singleton; | 356 scoped_refptr<Resource> new_singleton; |
356 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 357 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
357 | 358 |
358 switch (id) { | 359 switch (id) { |
359 case BROKER_SINGLETON_ID: | 360 case BROKER_SINGLETON_ID: |
360 new_singleton = new BrokerResource(connection, instance); | 361 new_singleton = new BrokerResource(connection, instance); |
361 break; | 362 break; |
362 case EXTENSIONS_COMMON_SINGLETON_ID: | 363 case EXTENSIONS_COMMON_SINGLETON_ID: |
363 new_singleton = new ExtensionsCommonResource(connection, instance); | 364 new_singleton = new ExtensionsCommonResource(connection, instance); |
364 break; | 365 break; |
| 366 case FILE_MAPPING_SINGLETON_ID: |
| 367 new_singleton = new FileMappingResource(connection, instance); |
| 368 break; |
365 case GAMEPAD_SINGLETON_ID: | 369 case GAMEPAD_SINGLETON_ID: |
366 new_singleton = new GamepadResource(connection, instance); | 370 new_singleton = new GamepadResource(connection, instance); |
367 break; | 371 break; |
368 case ISOLATED_FILESYSTEM_SINGLETON_ID: | 372 case ISOLATED_FILESYSTEM_SINGLETON_ID: |
369 new_singleton = | 373 new_singleton = |
370 new IsolatedFileSystemPrivateResource(connection, instance); | 374 new IsolatedFileSystemPrivateResource(connection, instance); |
371 break; | 375 break; |
372 case NETWORK_PROXY_SINGLETON_ID: | 376 case NETWORK_PROXY_SINGLETON_ID: |
373 new_singleton = new NetworkProxyResource(connection, instance); | 377 new_singleton = new NetworkProxyResource(connection, instance); |
374 break; | 378 break; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 PP_Instance instance) { | 1269 PP_Instance instance) { |
1266 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1270 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1267 GetInstanceData(instance); | 1271 GetInstanceData(instance); |
1268 if (!data) | 1272 if (!data) |
1269 return; // Instance was probably deleted. | 1273 return; // Instance was probably deleted. |
1270 data->should_do_request_surrounding_text = false; | 1274 data->should_do_request_surrounding_text = false; |
1271 } | 1275 } |
1272 | 1276 |
1273 } // namespace proxy | 1277 } // namespace proxy |
1274 } // namespace ppapi | 1278 } // namespace ppapi |
OLD | NEW |