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/flash_clipboard_resource.h" | 21 #include "ppapi/proxy/flash_clipboard_resource.h" |
22 #include "ppapi/proxy/flash_file_resource.h" | 22 #include "ppapi/proxy/flash_file_resource.h" |
23 #include "ppapi/proxy/flash_fullscreen_resource.h" | 23 #include "ppapi/proxy/flash_fullscreen_resource.h" |
24 #include "ppapi/proxy/flash_resource.h" | 24 #include "ppapi/proxy/flash_resource.h" |
25 #include "ppapi/proxy/gamepad_resource.h" | 25 #include "ppapi/proxy/gamepad_resource.h" |
26 #include "ppapi/proxy/host_dispatcher.h" | 26 #include "ppapi/proxy/host_dispatcher.h" |
27 #include "ppapi/proxy/plugin_dispatcher.h" | 27 #include "ppapi/proxy/plugin_dispatcher.h" |
28 #include "ppapi/proxy/ppapi_messages.h" | 28 #include "ppapi/proxy/ppapi_messages.h" |
29 #include "ppapi/proxy/serialized_var.h" | 29 #include "ppapi/proxy/serialized_var.h" |
| 30 #include "ppapi/proxy/truetype_font_singleton_resource.h" |
30 #include "ppapi/shared_impl/ppapi_globals.h" | 31 #include "ppapi/shared_impl/ppapi_globals.h" |
31 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 32 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
32 #include "ppapi/shared_impl/ppb_view_shared.h" | 33 #include "ppapi/shared_impl/ppb_view_shared.h" |
33 #include "ppapi/shared_impl/var.h" | 34 #include "ppapi/shared_impl/var.h" |
34 #include "ppapi/thunk/enter.h" | 35 #include "ppapi/thunk/enter.h" |
35 #include "ppapi/thunk/ppb_graphics_2d_api.h" | 36 #include "ppapi/thunk/ppb_graphics_2d_api.h" |
36 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 37 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
37 #include "ppapi/thunk/thunk.h" | 38 #include "ppapi/thunk/thunk.h" |
38 | 39 |
39 // Windows headers interfere with this file. | 40 // Windows headers interfere with this file. |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 scoped_refptr<Resource> new_singleton; | 351 scoped_refptr<Resource> new_singleton; |
351 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 352 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
352 | 353 |
353 switch (id) { | 354 switch (id) { |
354 case BROKER_SINGLETON_ID: | 355 case BROKER_SINGLETON_ID: |
355 new_singleton = new BrokerResource(connection, instance); | 356 new_singleton = new BrokerResource(connection, instance); |
356 break; | 357 break; |
357 case GAMEPAD_SINGLETON_ID: | 358 case GAMEPAD_SINGLETON_ID: |
358 new_singleton = new GamepadResource(connection, instance); | 359 new_singleton = new GamepadResource(connection, instance); |
359 break; | 360 break; |
| 361 case TRUETYPE_FONT_SINGLETON_ID: |
| 362 new_singleton = new TrueTypeFontSingletonResource(connection, instance); |
| 363 break; |
360 // Flash/trusted resources aren't needed for NaCl. | 364 // Flash/trusted resources aren't needed for NaCl. |
361 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 365 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
362 case BROWSER_FONT_SINGLETON_ID: | 366 case BROWSER_FONT_SINGLETON_ID: |
363 new_singleton = new BrowserFontSingletonResource(connection, instance); | 367 new_singleton = new BrowserFontSingletonResource(connection, instance); |
364 break; | 368 break; |
365 case FLASH_CLIPBOARD_SINGLETON_ID: | 369 case FLASH_CLIPBOARD_SINGLETON_ID: |
366 new_singleton = new FlashClipboardResource(connection, instance); | 370 new_singleton = new FlashClipboardResource(connection, instance); |
367 break; | 371 break; |
368 case FLASH_FILE_SINGLETON_ID: | 372 case FLASH_FILE_SINGLETON_ID: |
369 new_singleton = new FlashFileResource(connection, instance); | 373 new_singleton = new FlashFileResource(connection, instance); |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 PP_Instance instance) { | 1230 PP_Instance instance) { |
1227 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1231 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1228 GetInstanceData(instance); | 1232 GetInstanceData(instance); |
1229 if (!data) | 1233 if (!data) |
1230 return; // Instance was probably deleted. | 1234 return; // Instance was probably deleted. |
1231 data->should_do_request_surrounding_text = false; | 1235 data->should_do_request_surrounding_text = false; |
1232 } | 1236 } |
1233 | 1237 |
1234 } // namespace proxy | 1238 } // namespace proxy |
1235 } // namespace ppapi | 1239 } // namespace ppapi |
OLD | NEW |