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/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/audio_input_resource.h" | 10 #include "ppapi/proxy/audio_input_resource.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "ppapi/proxy/ppb_talk_private_proxy.h" | 33 #include "ppapi/proxy/ppb_talk_private_proxy.h" |
34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" | 34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" |
35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
36 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" | 36 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" |
37 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 37 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
38 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 38 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
39 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 39 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
40 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 40 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
41 #include "ppapi/proxy/printing_resource.h" | 41 #include "ppapi/proxy/printing_resource.h" |
42 #include "ppapi/proxy/url_request_info_resource.h" | 42 #include "ppapi/proxy/url_request_info_resource.h" |
| 43 #include "ppapi/proxy/url_response_info_resource.h" |
43 #include "ppapi/proxy/websocket_resource.h" | 44 #include "ppapi/proxy/websocket_resource.h" |
44 #include "ppapi/shared_impl/api_id.h" | 45 #include "ppapi/shared_impl/api_id.h" |
45 #include "ppapi/shared_impl/host_resource.h" | 46 #include "ppapi/shared_impl/host_resource.h" |
46 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 47 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
47 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 48 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
48 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | 49 #include "ppapi/shared_impl/ppb_resource_array_shared.h" |
49 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" | 50 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" |
50 #include "ppapi/shared_impl/var.h" | 51 #include "ppapi/shared_impl/var.h" |
51 #include "ppapi/thunk/enter.h" | 52 #include "ppapi/thunk/enter.h" |
52 #include "ppapi/thunk/ppb_image_data_api.h" | 53 #include "ppapi/thunk/ppb_image_data_api.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return PPB_URLLoader_Proxy::CreateProxyResource(instance); | 147 return PPB_URLLoader_Proxy::CreateProxyResource(instance); |
147 } | 148 } |
148 | 149 |
149 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( | 150 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( |
150 PP_Instance instance, | 151 PP_Instance instance, |
151 const URLRequestInfoData& data) { | 152 const URLRequestInfoData& data) { |
152 return (new URLRequestInfoResource(GetConnection(), | 153 return (new URLRequestInfoResource(GetConnection(), |
153 instance, data))->GetReference(); | 154 instance, data))->GetReference(); |
154 } | 155 } |
155 | 156 |
| 157 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( |
| 158 PP_Instance instance, |
| 159 const URLResponseInfoData& data, |
| 160 PP_Resource file_ref_resource) { |
| 161 return (new URLResponseInfoResource(GetConnection(), instance, |
| 162 data, |
| 163 file_ref_resource))->GetReference(); |
| 164 } |
| 165 |
156 PP_Resource ResourceCreationProxy::CreateWheelInputEvent( | 166 PP_Resource ResourceCreationProxy::CreateWheelInputEvent( |
157 PP_Instance instance, | 167 PP_Instance instance, |
158 PP_TimeTicks time_stamp, | 168 PP_TimeTicks time_stamp, |
159 uint32_t modifiers, | 169 uint32_t modifiers, |
160 const PP_FloatPoint* wheel_delta, | 170 const PP_FloatPoint* wheel_delta, |
161 const PP_FloatPoint* wheel_ticks, | 171 const PP_FloatPoint* wheel_ticks, |
162 PP_Bool scroll_by_page) { | 172 PP_Bool scroll_by_page) { |
163 return PPB_InputEvent_Shared::CreateWheelInputEvent( | 173 return PPB_InputEvent_Shared::CreateWheelInputEvent( |
164 OBJECT_IS_PROXY, instance, time_stamp, modifiers, | 174 OBJECT_IS_PROXY, instance, time_stamp, modifiers, |
165 wheel_delta, wheel_ticks, scroll_by_page); | 175 wheel_delta, wheel_ticks, scroll_by_page); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 } | 376 } |
367 | 377 |
368 Connection ResourceCreationProxy::GetConnection() { | 378 Connection ResourceCreationProxy::GetConnection() { |
369 return Connection( | 379 return Connection( |
370 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), | 380 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), |
371 dispatcher()); | 381 dispatcher()); |
372 } | 382 } |
373 | 383 |
374 } // namespace proxy | 384 } // namespace proxy |
375 } // namespace ppapi | 385 } // namespace ppapi |
OLD | NEW |