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

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/shared_impl/ppb_font_shared.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 15 matching lines...) Expand all
26 #include "ppapi/proxy/ppb_image_data_proxy.h" 26 #include "ppapi/proxy/ppb_image_data_proxy.h"
27 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" 27 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h"
28 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" 28 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h"
29 #include "ppapi/proxy/ppb_url_loader_proxy.h" 29 #include "ppapi/proxy/ppb_url_loader_proxy.h"
30 #include "ppapi/proxy/ppb_video_capture_proxy.h" 30 #include "ppapi/proxy/ppb_video_capture_proxy.h"
31 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 31 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
32 #include "ppapi/shared_impl/api_id.h" 32 #include "ppapi/shared_impl/api_id.h"
33 #include "ppapi/shared_impl/function_group_base.h" 33 #include "ppapi/shared_impl/function_group_base.h"
34 #include "ppapi/shared_impl/host_resource.h" 34 #include "ppapi/shared_impl/host_resource.h"
35 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 35 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
36 #include "ppapi/shared_impl/ppb_font_shared.h"
37 #include "ppapi/shared_impl/ppb_input_event_shared.h" 36 #include "ppapi/shared_impl/ppb_input_event_shared.h"
38 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 37 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
39 #include "ppapi/shared_impl/ppb_url_request_info_shared.h" 38 #include "ppapi/shared_impl/ppb_url_request_info_shared.h"
39 #include "ppapi/shared_impl/private/ppb_font_shared.h"
40 #include "ppapi/shared_impl/var.h" 40 #include "ppapi/shared_impl/var.h"
41 #include "ppapi/thunk/enter.h" 41 #include "ppapi/thunk/enter.h"
42 #include "ppapi/thunk/ppb_image_data_api.h" 42 #include "ppapi/thunk/ppb_image_data_api.h"
43 43
44 using ppapi::thunk::ResourceCreationAPI; 44 using ppapi::thunk::ResourceCreationAPI;
45 45
46 namespace ppapi { 46 namespace ppapi {
47 namespace proxy { 47 namespace proxy {
48 48
49 ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher) 49 ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher)
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 PP_Resource ResourceCreationProxy::CreateFlashNetConnector( 147 PP_Resource ResourceCreationProxy::CreateFlashNetConnector(
148 PP_Instance instance) { 148 PP_Instance instance) {
149 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); 149 return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance);
150 } 150 }
151 151
152 PP_Resource ResourceCreationProxy::CreateFontObject( 152 PP_Resource ResourceCreationProxy::CreateFontObject(
153 PP_Instance instance, 153 PP_Instance instance,
154 const PP_FontDescription_Dev* description) { 154 const PP_FontDescription_Dev* description) {
155 if (!PPB_Font_Shared::IsPPFontDescriptionValid(*description)) 155 PluginDispatcher* dispatcher =
156 PluginDispatcher::GetForInstance(instance);
157 if (!dispatcher)
156 return 0; 158 return 0;
157 return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> 159 return PPB_Font_Shared::CreateAsProxy(instance, *description,
158 GetReference(); 160 dispatcher->preferences());
159 } 161 }
160 162
161 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, 163 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
162 const PP_Size& size, 164 const PP_Size& size,
163 PP_Bool is_always_opaque) { 165 PP_Bool is_always_opaque) {
164 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size, 166 return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size,
165 is_always_opaque); 167 is_always_opaque);
166 } 168 }
167 169
168 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, 170 PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bool ResourceCreationProxy::Send(IPC::Message* msg) { 338 bool ResourceCreationProxy::Send(IPC::Message* msg) {
337 return dispatcher()->Send(msg); 339 return dispatcher()->Send(msg);
338 } 340 }
339 341
340 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 342 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
341 return false; 343 return false;
342 } 344 }
343 345
344 } // namespace proxy 346 } // namespace proxy
345 } // namespace ppapi 347 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | ppapi/shared_impl/ppb_font_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698