OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
9 #include "ppapi/proxy/host_resource.h" | 9 #include "ppapi/proxy/host_resource.h" |
10 #include "ppapi/proxy/interface_id.h" | 10 #include "ppapi/proxy/interface_id.h" |
11 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
12 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 12 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
13 #include "ppapi/proxy/plugin_resource_tracker.h" | 13 #include "ppapi/proxy/plugin_resource_tracker.h" |
14 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
15 #include "ppapi/proxy/ppb_audio_config_proxy.h" | 15 #include "ppapi/proxy/ppb_audio_config_proxy.h" |
16 #include "ppapi/proxy/ppb_audio_proxy.h" | 16 #include "ppapi/proxy/ppb_audio_proxy.h" |
17 #include "ppapi/proxy/ppb_buffer_proxy.h" | 17 #include "ppapi/proxy/ppb_buffer_proxy.h" |
18 #include "ppapi/proxy/ppb_broker_proxy.h" | 18 #include "ppapi/proxy/ppb_broker_proxy.h" |
19 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 19 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
20 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 20 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
21 #include "ppapi/proxy/ppb_file_system_proxy.h" | 21 #include "ppapi/proxy/ppb_file_system_proxy.h" |
| 22 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
| 23 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
22 #include "ppapi/proxy/ppb_font_proxy.h" | 24 #include "ppapi/proxy/ppb_font_proxy.h" |
23 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
24 #include "ppapi/proxy/ppb_image_data_proxy.h" | 26 #include "ppapi/proxy/ppb_image_data_proxy.h" |
25 #include "ppapi/shared_impl/font_impl.h" | 27 #include "ppapi/shared_impl/font_impl.h" |
26 #include "ppapi/shared_impl/function_group_base.h" | 28 #include "ppapi/shared_impl/function_group_base.h" |
27 #include "ppapi/thunk/enter.h" | 29 #include "ppapi/thunk/enter.h" |
28 #include "ppapi/thunk/ppb_image_data_api.h" | 30 #include "ppapi/thunk/ppb_image_data_api.h" |
29 | 31 |
30 using ppapi::thunk::ResourceCreationAPI; | 32 using ppapi::thunk::ResourceCreationAPI; |
31 | 33 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 const char* path) { | 98 const char* path) { |
97 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path); | 99 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path); |
98 } | 100 } |
99 | 101 |
100 PP_Resource ResourceCreationProxy::CreateFileSystem( | 102 PP_Resource ResourceCreationProxy::CreateFileSystem( |
101 PP_Instance instance, | 103 PP_Instance instance, |
102 PP_FileSystemType_Dev type) { | 104 PP_FileSystemType_Dev type) { |
103 return PPB_FileSystem_Proxy::CreateProxyResource(instance, type); | 105 return PPB_FileSystem_Proxy::CreateProxyResource(instance, type); |
104 } | 106 } |
105 | 107 |
| 108 PP_Resource ResourceCreationProxy::CreateFlashMenu( |
| 109 PP_Instance instance, |
| 110 const PP_Flash_Menu* menu_data) { |
| 111 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); |
| 112 } |
| 113 |
| 114 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( |
| 115 PP_Instance instance) { |
| 116 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); |
| 117 } |
| 118 |
106 PP_Resource ResourceCreationProxy::CreateFontObject( | 119 PP_Resource ResourceCreationProxy::CreateFontObject( |
107 PP_Instance instance, | 120 PP_Instance instance, |
108 const PP_FontDescription_Dev* description) { | 121 const PP_FontDescription_Dev* description) { |
109 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) | 122 if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) |
110 return 0; | 123 return 0; |
111 | 124 |
112 linked_ptr<Font> object(new Font(HostResource::MakeInstanceOnly(instance), | 125 linked_ptr<Font> object(new Font(HostResource::MakeInstanceOnly(instance), |
113 *description)); | 126 *description)); |
114 return PluginResourceTracker::GetInstance()->AddResource(object); | 127 return PluginResourceTracker::GetInstance()->AddResource(object); |
115 } | 128 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); | 229 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); |
217 #else | 230 #else |
218 *result_image_handle = ImageData::HandleFromInt(handle); | 231 *result_image_handle = ImageData::HandleFromInt(handle); |
219 #endif | 232 #endif |
220 } | 233 } |
221 } | 234 } |
222 } | 235 } |
223 | 236 |
224 } // namespace proxy | 237 } // namespace proxy |
225 } // namespace pp | 238 } // namespace pp |
OLD | NEW |