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/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
11 #include "ppapi/proxy/plugin_resource_tracker.h" | 11 #include "ppapi/proxy/plugin_resource_tracker.h" |
12 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
13 #include "ppapi/proxy/ppb_audio_proxy.h" | 13 #include "ppapi/proxy/ppb_audio_proxy.h" |
14 #include "ppapi/proxy/ppb_buffer_proxy.h" | 14 #include "ppapi/proxy/ppb_buffer_proxy.h" |
15 #include "ppapi/proxy/ppb_broker_proxy.h" | 15 #include "ppapi/proxy/ppb_broker_proxy.h" |
16 #include "ppapi/proxy/ppb_context_3d_proxy.h" | 16 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
18 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 18 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
19 #include "ppapi/proxy/ppb_file_system_proxy.h" | 19 #include "ppapi/proxy/ppb_file_system_proxy.h" |
20 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 20 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
21 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" | 21 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
22 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" | 22 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" |
23 #include "ppapi/proxy/ppb_flash_udp_socket_proxy.h" | 23 #include "ppapi/proxy/ppb_flash_udp_socket_proxy.h" |
24 #include "ppapi/proxy/ppb_font_proxy.h" | 24 #include "ppapi/proxy/ppb_font_proxy.h" |
25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
26 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 26 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
| 27 #include "ppapi/proxy/ppb_hello_proxy.h" |
27 #include "ppapi/proxy/ppb_image_data_proxy.h" | 28 #include "ppapi/proxy/ppb_image_data_proxy.h" |
28 #include "ppapi/proxy/ppb_surface_3d_proxy.h" | 29 #include "ppapi/proxy/ppb_surface_3d_proxy.h" |
29 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 30 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
30 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 31 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
31 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 32 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
32 #include "ppapi/shared_impl/api_id.h" | 33 #include "ppapi/shared_impl/api_id.h" |
33 #include "ppapi/shared_impl/audio_config_impl.h" | 34 #include "ppapi/shared_impl/audio_config_impl.h" |
34 #include "ppapi/shared_impl/font_impl.h" | 35 #include "ppapi/shared_impl/font_impl.h" |
35 #include "ppapi/shared_impl/function_group_base.h" | 36 #include "ppapi/shared_impl/function_group_base.h" |
36 #include "ppapi/shared_impl/host_resource.h" | 37 #include "ppapi/shared_impl/host_resource.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 GetReference(); | 172 GetReference(); |
172 } | 173 } |
173 | 174 |
174 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, | 175 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, |
175 const PP_Size& size, | 176 const PP_Size& size, |
176 PP_Bool is_always_opaque) { | 177 PP_Bool is_always_opaque) { |
177 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, | 178 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, |
178 is_always_opaque); | 179 is_always_opaque); |
179 } | 180 } |
180 | 181 |
| 182 PP_Resource ResourceCreationProxy::CreateHello(PP_Instance instance) { |
| 183 return PPB_Hello_Proxy::CreateProxyResource(instance); |
| 184 } |
| 185 |
181 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, | 186 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, |
182 PP_ImageDataFormat format, | 187 PP_ImageDataFormat format, |
183 const PP_Size& size, | 188 const PP_Size& size, |
184 PP_Bool init_to_zero) { | 189 PP_Bool init_to_zero) { |
185 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 190 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
186 if (!dispatcher) | 191 if (!dispatcher) |
187 return 0; | 192 return 0; |
188 | 193 |
189 HostResource result; | 194 HostResource result; |
190 std::string image_data_desc; | 195 std::string image_data_desc; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); | 421 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); |
417 #else | 422 #else |
418 *result_image_handle = ImageData::HandleFromInt(handle); | 423 *result_image_handle = ImageData::HandleFromInt(handle); |
419 #endif | 424 #endif |
420 } | 425 } |
421 } | 426 } |
422 } | 427 } |
423 | 428 |
424 } // namespace proxy | 429 } // namespace proxy |
425 } // namespace ppapi | 430 } // namespace ppapi |
OLD | NEW |