Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: content/renderer/pepper/pepper_in_process_resource_creation.cc

Issue 11441012: PPB_UDPSocket_Private is switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PPB_UDPSocket_Shared is merged to UDPSocketPrivateResource. PepperUDPSocketPrivateShared is merged … Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 10 #include "base/message_loop.h"
10 #include "content/renderer/render_view_impl.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 "ipc/ipc_message.h" 14 #include "ipc/ipc_message.h"
14 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
15 #include "ppapi/host/ppapi_host.h" 16 #include "ppapi/host/ppapi_host.h"
16 #include "ppapi/proxy/browser_font_resource_trusted.h" 17 #include "ppapi/proxy/browser_font_resource_trusted.h"
17 #include "ppapi/proxy/file_chooser_resource.h" 18 #include "ppapi/proxy/file_chooser_resource.h"
18 #include "ppapi/proxy/graphics_2d_resource.h" 19 #include "ppapi/proxy/graphics_2d_resource.h"
19 #include "ppapi/proxy/ppapi_messages.h" 20 #include "ppapi/proxy/ppapi_messages.h"
20 #include "ppapi/proxy/printing_resource.h" 21 #include "ppapi/proxy/printing_resource.h"
22 #include "ppapi/proxy/udp_socket_private_resource.h"
21 #include "ppapi/proxy/url_request_info_resource.h" 23 #include "ppapi/proxy/url_request_info_resource.h"
22 #include "ppapi/proxy/url_response_info_resource.h" 24 #include "ppapi/proxy/url_response_info_resource.h"
23 #include "ppapi/proxy/websocket_resource.h" 25 #include "ppapi/proxy/websocket_resource.h"
24 #include "ppapi/shared_impl/ppapi_globals.h" 26 #include "ppapi/shared_impl/ppapi_globals.h"
25 #include "ppapi/shared_impl/ppapi_permissions.h" 27 #include "ppapi/shared_impl/ppapi_permissions.h"
26 #include "ppapi/shared_impl/resource_tracker.h" 28 #include "ppapi/shared_impl/resource_tracker.h"
27 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 29 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
28 30
29 // Note that the code in the creation functions in this file should generally 31 // Note that the code in the creation functions in this file should generally
30 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See 32 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See
31 // pepper_in_process_resource_creation.h for what this file is for. 33 // pepper_in_process_resource_creation.h for what this file is for.
32 34
35 namespace {
36
37 const PP_Resource kInvalidResource = 0;
38
39 } // namespace
40
33 namespace content { 41 namespace content {
34 42
35 // PepperInProcessResourceCreation -------------------------------------------- 43 // PepperInProcessResourceCreation --------------------------------------------
36 44
37 PepperInProcessResourceCreation::PepperInProcessResourceCreation( 45 PepperInProcessResourceCreation::PepperInProcessResourceCreation(
38 RendererPpapiHostImpl* host_impl, 46 RendererPpapiHostImpl* host_impl,
39 webkit::ppapi::PluginInstance* instance) 47 webkit::ppapi::PluginInstance* instance)
40 : ResourceCreationImpl(instance), 48 : ResourceCreationImpl(instance),
41 host_impl_(host_impl) { 49 host_impl_(host_impl) {
42 } 50 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 instance, size, is_always_opaque))->GetReference(); 85 instance, size, is_always_opaque))->GetReference();
78 } 86 }
79 87
80 PP_Resource PepperInProcessResourceCreation::CreatePrinting( 88 PP_Resource PepperInProcessResourceCreation::CreatePrinting(
81 PP_Instance instance) { 89 PP_Instance instance) {
82 return (new ppapi::proxy::PrintingResource( 90 return (new ppapi::proxy::PrintingResource(
83 host_impl_->in_process_router()->GetPluginConnection(), 91 host_impl_->in_process_router()->GetPluginConnection(),
84 instance))->GetReference(); 92 instance))->GetReference();
85 } 93 }
86 94
95 PP_Resource PepperInProcessResourceCreation::CreateUDPSocketPrivate(
96 PP_Instance instance) {
97 NOTIMPLEMENTED();
98 return kInvalidResource;
99 }
100
87 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( 101 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo(
88 PP_Instance instance, 102 PP_Instance instance,
89 const ::ppapi::URLRequestInfoData& data) { 103 const ::ppapi::URLRequestInfoData& data) {
90 return (new ppapi::proxy::URLRequestInfoResource( 104 return (new ppapi::proxy::URLRequestInfoResource(
91 host_impl_->in_process_router()->GetPluginConnection(), 105 host_impl_->in_process_router()->GetPluginConnection(),
92 instance, data))->GetReference(); 106 instance, data))->GetReference();
93 } 107 }
94 108
95 PP_Resource PepperInProcessResourceCreation::CreateURLResponseInfo( 109 PP_Resource PepperInProcessResourceCreation::CreateURLResponseInfo(
96 PP_Instance instance, 110 PP_Instance instance,
97 const ::ppapi::URLResponseInfoData& data, 111 const ::ppapi::URLResponseInfoData& data,
98 PP_Resource file_ref_resource) { 112 PP_Resource file_ref_resource) {
99 return (new ppapi::proxy::URLResponseInfoResource( 113 return (new ppapi::proxy::URLResponseInfoResource(
100 host_impl_->in_process_router()->GetPluginConnection(), 114 host_impl_->in_process_router()->GetPluginConnection(),
101 instance, data, file_ref_resource))->GetReference(); 115 instance, data, file_ref_resource))->GetReference();
102 } 116 }
103 117
104 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( 118 PP_Resource PepperInProcessResourceCreation::CreateWebSocket(
105 PP_Instance instance) { 119 PP_Instance instance) {
106 return (new ppapi::proxy::WebSocketResource( 120 return (new ppapi::proxy::WebSocketResource(
107 host_impl_->in_process_router()->GetPluginConnection(), 121 host_impl_->in_process_router()->GetPluginConnection(),
108 instance))->GetReference(); 122 instance))->GetReference();
109 } 123 }
110 124
111 } // namespace content 125 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698