| 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/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "content/child/browser_font_resource_trusted.h" | 11 #include "content/child/browser_font_resource_trusted.h" |
| 12 #include "content/renderer/pepper/pepper_in_process_router.h" | 12 #include "content/renderer/pepper/pepper_in_process_router.h" |
| 13 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 13 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 14 #include "content/renderer/pepper/ppapi_preferences_builder.h" | 14 #include "content/renderer/pepper/ppapi_preferences_builder.h" |
| 15 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 15 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 16 #include "content/renderer/render_view_impl.h" | 16 #include "content/renderer/render_view_impl.h" |
| 17 #include "ipc/ipc_message.h" | 17 #include "ipc/ipc_message.h" |
| 18 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
| 19 #include "ppapi/host/ppapi_host.h" | 19 #include "ppapi/host/ppapi_host.h" |
| 20 #include "ppapi/proxy/file_chooser_resource.h" | 20 #include "ppapi/proxy/file_chooser_resource.h" |
| 21 #include "ppapi/proxy/file_io_resource.h" | 21 #include "ppapi/proxy/file_io_resource.h" |
| 22 #include "ppapi/proxy/file_ref_resource.h" | 22 #include "ppapi/proxy/file_ref_resource.h" |
| 23 #include "ppapi/proxy/file_system_resource.h" | 23 #include "ppapi/proxy/file_system_resource.h" |
| 24 #include "ppapi/proxy/graphics_2d_resource.h" | 24 #include "ppapi/proxy/graphics_2d_resource.h" |
| 25 #include "ppapi/proxy/ppapi_messages.h" | 25 #include "ppapi/proxy/ppapi_messages.h" |
| 26 #include "ppapi/proxy/printing_resource.h" | 26 #include "ppapi/proxy/printing_resource.h" |
| 27 #include "ppapi/proxy/url_loader_resource.h" | 27 #include "ppapi/proxy/url_loader_resource.h" |
| 28 #include "ppapi/proxy/url_request_info_resource.h" | 28 #include "ppapi/proxy/url_request_info_resource.h" |
| 29 #include "ppapi/proxy/url_response_info_resource.h" | 29 #include "ppapi/proxy/url_response_info_resource.h" |
| 30 #include "ppapi/proxy/vpn_provider_resource.h" |
| 30 #include "ppapi/proxy/websocket_resource.h" | 31 #include "ppapi/proxy/websocket_resource.h" |
| 31 #include "ppapi/shared_impl/ppapi_globals.h" | 32 #include "ppapi/shared_impl/ppapi_globals.h" |
| 32 #include "ppapi/shared_impl/ppapi_permissions.h" | 33 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 33 #include "ppapi/shared_impl/resource_tracker.h" | 34 #include "ppapi/shared_impl/resource_tracker.h" |
| 34 #include "ppapi/shared_impl/var.h" | 35 #include "ppapi/shared_impl/var.h" |
| 35 | 36 |
| 36 // Note that the code in the creation functions in this file should generally | 37 // Note that the code in the creation functions in this file should generally |
| 37 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See | 38 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See |
| 38 // pepper_in_process_resource_creation.h for what this file is for. | 39 // pepper_in_process_resource_creation.h for what this file is for. |
| 39 | 40 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 135 } |
| 135 | 136 |
| 136 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( | 137 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( |
| 137 PP_Instance instance) { | 138 PP_Instance instance) { |
| 138 return (new ppapi::proxy::URLRequestInfoResource( | 139 return (new ppapi::proxy::URLRequestInfoResource( |
| 139 host_impl_->in_process_router()->GetPluginConnection(instance), | 140 host_impl_->in_process_router()->GetPluginConnection(instance), |
| 140 instance, | 141 instance, |
| 141 ppapi::URLRequestInfoData()))->GetReference(); | 142 ppapi::URLRequestInfoData()))->GetReference(); |
| 142 } | 143 } |
| 143 | 144 |
| 145 PP_Resource PepperInProcessResourceCreation::CreateVpnProvider( |
| 146 PP_Instance instance) { |
| 147 return (new ppapi::proxy::VpnProviderResource( |
| 148 host_impl_->in_process_router()->GetPluginConnection(instance), |
| 149 instance))->GetReference(); |
| 150 } |
| 151 |
| 144 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( | 152 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( |
| 145 PP_Instance instance) { | 153 PP_Instance instance) { |
| 146 return (new ppapi::proxy::WebSocketResource( | 154 return (new ppapi::proxy::WebSocketResource( |
| 147 host_impl_->in_process_router()->GetPluginConnection(instance), | 155 host_impl_->in_process_router()->GetPluginConnection(instance), |
| 148 instance))->GetReference(); | 156 instance))->GetReference(); |
| 149 } | 157 } |
| 150 | 158 |
| 151 } // namespace content | 159 } // namespace content |
| OLD | NEW |