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

Side by Side Diff: webkit/plugins/ppapi/resource_creation_impl.cc

Issue 11316161: Refactor BrowserFont to new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | 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 "webkit/plugins/ppapi/resource_creation_impl.h" 5 #include "webkit/plugins/ppapi/resource_creation_impl.h"
6 6
7 #include "ppapi/c/pp_size.h" 7 #include "ppapi/c/pp_size.h"
8 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 8 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h"
10 #include "ppapi/shared_impl/ppb_input_event_shared.h" 9 #include "ppapi/shared_impl/ppb_input_event_shared.h"
11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 10 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
12 #include "ppapi/shared_impl/var.h" 11 #include "ppapi/shared_impl/var.h"
13 #include "webkit/plugins/ppapi/common.h" 12 #include "webkit/plugins/ppapi/common.h"
14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" 13 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
15 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 14 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
16 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" 15 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" 16 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 17 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" 18 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 69 }
71 70
72 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) { 71 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) {
73 return 0; // Not supported in-process. 72 return 0; // Not supported in-process.
74 } 73 }
75 74
76 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { 75 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) {
77 return (new PPB_Broker_Impl(instance))->GetReference(); 76 return (new PPB_Broker_Impl(instance))->GetReference();
78 } 77 }
79 78
80 PP_Resource ResourceCreationImpl::CreateBrowserFont(
81 PP_Instance instance,
82 const PP_BrowserFont_Trusted_Description* description) {
83 PluginInstance* plugin_instance =
84 ResourceHelper::PPInstanceToPluginInstance(instance);
85 if (!plugin_instance)
86 return 0;
87 return ::ppapi::PPB_BrowserFont_Trusted_Shared::Create(
88 ::ppapi::OBJECT_IS_IMPL, instance, *description,
89 plugin_instance->delegate()->GetPreferences());
90 }
91
92 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance, 79 PP_Resource ResourceCreationImpl::CreateBuffer(PP_Instance instance,
93 uint32_t size) { 80 uint32_t size) {
94 return PPB_Buffer_Impl::Create(instance, size); 81 return PPB_Buffer_Impl::Create(instance, size);
95 } 82 }
96 83
97 PP_Resource ResourceCreationImpl::CreateDirectoryReader( 84 PP_Resource ResourceCreationImpl::CreateDirectoryReader(
98 PP_Resource directory_ref) { 85 PP_Resource directory_ref) {
99 return PPB_DirectoryReader_Impl::Create(directory_ref); 86 return PPB_DirectoryReader_Impl::Create(directory_ref);
100 } 87 }
101 88
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 wheel_delta, wheel_ticks, scroll_by_page); 280 wheel_delta, wheel_ticks, scroll_by_page);
294 } 281 }
295 282
296 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( 283 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate(
297 PP_Instance instance) { 284 PP_Instance instance) {
298 return PPB_X509Certificate_Private_Impl::CreateResource(instance); 285 return PPB_X509Certificate_Private_Impl::CreateResource(instance);
299 } 286 }
300 287
301 } // namespace ppapi 288 } // namespace ppapi
302 } // namespace webkit 289 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698