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" |
(...skipping 12 matching lines...) Expand all Loading... |
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_loader_resource.h" |
26 #include "ppapi/proxy/url_request_info_resource.h" | 26 #include "ppapi/proxy/url_request_info_resource.h" |
27 #include "ppapi/proxy/url_response_info_resource.h" | 27 #include "ppapi/proxy/url_response_info_resource.h" |
28 #include "ppapi/proxy/websocket_resource.h" | 28 #include "ppapi/proxy/websocket_resource.h" |
29 #include "ppapi/shared_impl/ppapi_globals.h" | 29 #include "ppapi/shared_impl/ppapi_globals.h" |
30 #include "ppapi/shared_impl/ppapi_permissions.h" | 30 #include "ppapi/shared_impl/ppapi_permissions.h" |
31 #include "ppapi/shared_impl/resource_tracker.h" | 31 #include "ppapi/shared_impl/resource_tracker.h" |
32 #include "ppapi/shared_impl/var.h" | 32 #include "ppapi/shared_impl/var.h" |
33 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 33 #include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h" |
34 | 34 |
35 // 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 |
36 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See | 36 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See |
37 // pepper_in_process_resource_creation.h for what this file is for. | 37 // pepper_in_process_resource_creation.h for what this file is for. |
38 | 38 |
39 namespace content { | 39 namespace content { |
40 | 40 |
41 // PepperInProcessResourceCreation -------------------------------------------- | 41 // PepperInProcessResourceCreation -------------------------------------------- |
42 | 42 |
43 PepperInProcessResourceCreation::PepperInProcessResourceCreation( | 43 PepperInProcessResourceCreation::PepperInProcessResourceCreation( |
44 RendererPpapiHostImpl* host_impl, | 44 RendererPpapiHostImpl* host_impl, |
45 webkit::ppapi::PluginInstance* instance) | 45 webkit::ppapi::PluginInstanceImpl* instance) |
46 : ResourceCreationImpl(instance), | 46 : ResourceCreationImpl(instance), |
47 host_impl_(host_impl) { | 47 host_impl_(host_impl) { |
48 } | 48 } |
49 | 49 |
50 PepperInProcessResourceCreation::~PepperInProcessResourceCreation() { | 50 PepperInProcessResourceCreation::~PepperInProcessResourceCreation() { |
51 } | 51 } |
52 | 52 |
53 PP_Resource PepperInProcessResourceCreation::CreateBrowserFont( | 53 PP_Resource PepperInProcessResourceCreation::CreateBrowserFont( |
54 PP_Instance instance, | 54 PP_Instance instance, |
55 const PP_BrowserFont_Trusted_Description* description) { | 55 const PP_BrowserFont_Trusted_Description* description) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( | 134 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( |
135 PP_Instance instance) { | 135 PP_Instance instance) { |
136 return (new ppapi::proxy::WebSocketResource( | 136 return (new ppapi::proxy::WebSocketResource( |
137 host_impl_->in_process_router()->GetPluginConnection(instance), | 137 host_impl_->in_process_router()->GetPluginConnection(instance), |
138 instance))->GetReference(); | 138 instance))->GetReference(); |
139 } | 139 } |
140 | 140 |
141 } // namespace content | 141 } // namespace content |
OLD | NEW |