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 "content/renderer/pepper/pepper_in_process_resource_creation.h" | 5 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "content/renderer/pepper/pepper_in_process_router.h" | 11 #include "content/renderer/pepper/pepper_in_process_router.h" |
12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
13 #include "content/renderer/render_view_impl.h" | 13 #include "content/renderer/render_view_impl.h" |
14 #include "ipc/ipc_message.h" | 14 #include "ipc/ipc_message.h" |
15 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
16 #include "ppapi/host/ppapi_host.h" | 16 #include "ppapi/host/ppapi_host.h" |
17 #include "ppapi/proxy/browser_font_resource_trusted.h" | 17 #include "ppapi/proxy/browser_font_resource_trusted.h" |
18 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" | 18 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" |
19 #include "ppapi/proxy/file_chooser_resource.h" | 19 #include "ppapi/proxy/file_chooser_resource.h" |
20 #include "ppapi/proxy/file_io_resource.h" | 20 #include "ppapi/proxy/file_io_resource.h" |
21 #include "ppapi/proxy/file_system_resource.h" | 21 #include "ppapi/proxy/file_system_resource.h" |
22 #include "ppapi/proxy/graphics_2d_resource.h" | 22 #include "ppapi/proxy/graphics_2d_resource.h" |
23 #include "ppapi/proxy/ppapi_messages.h" | 23 #include "ppapi/proxy/ppapi_messages.h" |
24 #include "ppapi/proxy/printing_resource.h" | 24 #include "ppapi/proxy/printing_resource.h" |
| 25 #include "ppapi/proxy/url_loader_resource.h" |
25 #include "ppapi/proxy/url_request_info_resource.h" | 26 #include "ppapi/proxy/url_request_info_resource.h" |
26 #include "ppapi/proxy/url_response_info_resource.h" | 27 #include "ppapi/proxy/url_response_info_resource.h" |
27 #include "ppapi/proxy/websocket_resource.h" | 28 #include "ppapi/proxy/websocket_resource.h" |
28 #include "ppapi/shared_impl/ppapi_globals.h" | 29 #include "ppapi/shared_impl/ppapi_globals.h" |
29 #include "ppapi/shared_impl/ppapi_permissions.h" | 30 #include "ppapi/shared_impl/ppapi_permissions.h" |
30 #include "ppapi/shared_impl/resource_tracker.h" | 31 #include "ppapi/shared_impl/resource_tracker.h" |
31 #include "ppapi/shared_impl/var.h" | 32 #include "ppapi/shared_impl/var.h" |
32 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 33 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
33 | 34 |
34 // Note that the code in the creation functions in this file should generally | 35 // Note that the code in the creation functions in this file should generally |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 instance))->GetReference(); | 108 instance))->GetReference(); |
108 } | 109 } |
109 | 110 |
110 PP_Resource PepperInProcessResourceCreation::CreateTrueTypeFont( | 111 PP_Resource PepperInProcessResourceCreation::CreateTrueTypeFont( |
111 PP_Instance instance, | 112 PP_Instance instance, |
112 const PP_TrueTypeFontDesc_Dev* desc) { | 113 const PP_TrueTypeFontDesc_Dev* desc) { |
113 NOTIMPLEMENTED(); | 114 NOTIMPLEMENTED(); |
114 return 0; | 115 return 0; |
115 } | 116 } |
116 | 117 |
| 118 PP_Resource PepperInProcessResourceCreation::CreateURLLoader( |
| 119 PP_Instance instance) { |
| 120 return (new ppapi::proxy::URLLoaderResource( |
| 121 host_impl_->in_process_router()->GetPluginConnection(), |
| 122 instance))->GetReference(); |
| 123 } |
| 124 |
117 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( | 125 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( |
118 PP_Instance instance) { | 126 PP_Instance instance) { |
119 return (new ppapi::proxy::URLRequestInfoResource( | 127 return (new ppapi::proxy::URLRequestInfoResource( |
120 host_impl_->in_process_router()->GetPluginConnection(), | 128 host_impl_->in_process_router()->GetPluginConnection(), |
121 instance, ::ppapi::URLRequestInfoData()))->GetReference(); | 129 instance, ::ppapi::URLRequestInfoData()))->GetReference(); |
122 } | 130 } |
123 | 131 |
124 PP_Resource PepperInProcessResourceCreation::CreateURLResponseInfo( | 132 PP_Resource PepperInProcessResourceCreation::CreateURLResponseInfo( |
125 PP_Instance instance, | 133 PP_Instance instance, |
126 const ::ppapi::URLResponseInfoData& data, | 134 const ::ppapi::URLResponseInfoData& data, |
127 PP_Resource file_ref_resource) { | 135 PP_Resource file_ref_resource) { |
128 return (new ppapi::proxy::URLResponseInfoResource( | 136 return (new ppapi::proxy::URLResponseInfoResource( |
129 host_impl_->in_process_router()->GetPluginConnection(), | 137 host_impl_->in_process_router()->GetPluginConnection(), |
130 instance, data, file_ref_resource))->GetReference(); | 138 instance, data, file_ref_resource))->GetReference(); |
131 } | 139 } |
132 | 140 |
133 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( | 141 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( |
134 PP_Instance instance) { | 142 PP_Instance instance) { |
135 return (new ppapi::proxy::WebSocketResource( | 143 return (new ppapi::proxy::WebSocketResource( |
136 host_impl_->in_process_router()->GetPluginConnection(), | 144 host_impl_->in_process_router()->GetPluginConnection(), |
137 instance))->GetReference(); | 145 instance))->GetReference(); |
138 } | 146 } |
139 | 147 |
140 } // namespace content | 148 } // namespace content |
OLD | NEW |