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

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

Issue 11411357: PPB_HostResolver_Private is switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed MockPluginDelegate. Created 8 years 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/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/renderer/render_view_impl.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 "ipc/ipc_message.h" 13 #include "ipc/ipc_message.h"
14 #include "ipc/ipc_message_macros.h" 14 #include "ipc/ipc_message_macros.h"
15 #include "ppapi/host/ppapi_host.h" 15 #include "ppapi/host/ppapi_host.h"
16 #include "ppapi/proxy/browser_font_resource_trusted.h" 16 #include "ppapi/proxy/browser_font_resource_trusted.h"
17 #include "ppapi/proxy/file_chooser_resource.h" 17 #include "ppapi/proxy/file_chooser_resource.h"
18 #include "ppapi/proxy/graphics_2d_resource.h" 18 #include "ppapi/proxy/graphics_2d_resource.h"
19 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
20 #include "ppapi/proxy/printing_resource.h" 20 #include "ppapi/proxy/printing_resource.h"
21 #include "ppapi/proxy/url_request_info_resource.h" 21 #include "ppapi/proxy/url_request_info_resource.h"
22 #include "ppapi/proxy/url_response_info_resource.h" 22 #include "ppapi/proxy/url_response_info_resource.h"
23 #include "ppapi/proxy/websocket_resource.h" 23 #include "ppapi/proxy/websocket_resource.h"
24 #include "ppapi/shared_impl/ppapi_globals.h" 24 #include "ppapi/shared_impl/ppapi_globals.h"
25 #include "ppapi/shared_impl/ppapi_permissions.h" 25 #include "ppapi/shared_impl/ppapi_permissions.h"
26 #include "ppapi/shared_impl/resource_tracker.h" 26 #include "ppapi/shared_impl/resource_tracker.h"
27 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 27 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
28 28
29 namespace {
30
31 PP_Resource kInvalidResource = 0;
32
33 } // namespace
34
29 // 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
30 // 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
31 // 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.
32 38
33 namespace content { 39 namespace content {
34 40
35 // PepperInProcessResourceCreation -------------------------------------------- 41 // PepperInProcessResourceCreation --------------------------------------------
36 42
37 PepperInProcessResourceCreation::PepperInProcessResourceCreation( 43 PepperInProcessResourceCreation::PepperInProcessResourceCreation(
38 RendererPpapiHostImpl* host_impl, 44 RendererPpapiHostImpl* host_impl,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 76
71 PP_Resource PepperInProcessResourceCreation::CreateGraphics2D( 77 PP_Resource PepperInProcessResourceCreation::CreateGraphics2D(
72 PP_Instance instance, 78 PP_Instance instance,
73 const PP_Size& size, 79 const PP_Size& size,
74 PP_Bool is_always_opaque) { 80 PP_Bool is_always_opaque) {
75 return (new ppapi::proxy::Graphics2DResource( 81 return (new ppapi::proxy::Graphics2DResource(
76 host_impl_->in_process_router()->GetPluginConnection(), 82 host_impl_->in_process_router()->GetPluginConnection(),
77 instance, size, is_always_opaque))->GetReference(); 83 instance, size, is_always_opaque))->GetReference();
78 } 84 }
79 85
86 PP_Resource PepperInProcessResourceCreation::CreateHostResolverPrivate(
87 PP_Instance instance) {
88 NOTIMPLEMENTED();
89 return kInvalidResource;
yzshen1 2012/12/20 20:00:20 I personally don't think this is necessary, becaus
ygorshenin1 2012/12/21 12:53:26 Done. I prefer to use symbolic names instead of n
90 }
91
80 PP_Resource PepperInProcessResourceCreation::CreatePrinting( 92 PP_Resource PepperInProcessResourceCreation::CreatePrinting(
81 PP_Instance instance) { 93 PP_Instance instance) {
82 return (new ppapi::proxy::PrintingResource( 94 return (new ppapi::proxy::PrintingResource(
83 host_impl_->in_process_router()->GetPluginConnection(), 95 host_impl_->in_process_router()->GetPluginConnection(),
84 instance))->GetReference(); 96 instance))->GetReference();
85 } 97 }
86 98
87 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( 99 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo(
88 PP_Instance instance, 100 PP_Instance instance,
89 const ::ppapi::URLRequestInfoData& data) { 101 const ::ppapi::URLRequestInfoData& data) {
(...skipping 12 matching lines...) Expand all
102 } 114 }
103 115
104 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( 116 PP_Resource PepperInProcessResourceCreation::CreateWebSocket(
105 PP_Instance instance) { 117 PP_Instance instance) {
106 return (new ppapi::proxy::WebSocketResource( 118 return (new ppapi::proxy::WebSocketResource(
107 host_impl_->in_process_router()->GetPluginConnection(), 119 host_impl_->in_process_router()->GetPluginConnection(),
108 instance))->GetReference(); 120 instance))->GetReference();
109 } 121 }
110 122
111 } // namespace content 123 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698