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

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

Issue 11366038: Rewrite PPB_AudioInput_Dev to use the new-style host/resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 "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" 9 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h"
10 #include "ppapi/shared_impl/ppb_input_event_shared.h" 10 #include "ppapi/shared_impl/ppb_input_event_shared.h"
11 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 11 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
12 #include "ppapi/shared_impl/var.h" 12 #include "ppapi/shared_impl/var.h"
13 #include "webkit/plugins/ppapi/common.h" 13 #include "webkit/plugins/ppapi/common.h"
14 #include "webkit/plugins/ppapi/ppb_audio_impl.h" 14 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
15 #include "webkit/plugins/ppapi/ppb_audio_input_impl.h"
16 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 15 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
17 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" 16 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
18 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" 17 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
19 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 18 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
20 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" 19 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
21 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" 20 #include "webkit/plugins/ppapi/ppb_file_system_impl.h"
22 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" 21 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
23 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" 22 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h"
24 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" 23 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
25 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 24 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 uint32_t sample_frame_count) { 64 uint32_t sample_frame_count) {
66 return ::ppapi::PPB_AudioConfig_Shared::Create( 65 return ::ppapi::PPB_AudioConfig_Shared::Create(
67 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count); 66 ::ppapi::OBJECT_IS_IMPL, instance, sample_rate, sample_frame_count);
68 } 67 }
69 68
70 PP_Resource ResourceCreationImpl::CreateAudioTrusted( 69 PP_Resource ResourceCreationImpl::CreateAudioTrusted(
71 PP_Instance instance) { 70 PP_Instance instance) {
72 return (new PPB_Audio_Impl(instance))->GetReference(); 71 return (new PPB_Audio_Impl(instance))->GetReference();
73 } 72 }
74 73
75 PP_Resource ResourceCreationImpl::CreateAudioInput0_1(
76 PP_Instance instance,
77 PP_Resource config_id,
78 PPB_AudioInput_Callback audio_input_callback,
79 void* user_data) {
80 return PPB_AudioInput_Impl::Create0_1(instance, config_id,
81 audio_input_callback, user_data);
82 }
83
84 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) { 74 PP_Resource ResourceCreationImpl::CreateAudioInput(PP_Instance instance) {
85 return (new PPB_AudioInput_Impl(instance))->GetReference(); 75 return 0; // Not supported in-process.
raymes 2012/11/07 00:11:46 Maybe add NOTIMPLEMENTED() here?
yzshen1 2012/11/08 18:57:30 As we discussed, NOTIMPLEMENTED() is for something
86 } 76 }
87 77
88 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) { 78 PP_Resource ResourceCreationImpl::CreateBroker(PP_Instance instance) {
89 return (new PPB_Broker_Impl(instance))->GetReference(); 79 return (new PPB_Broker_Impl(instance))->GetReference();
90 } 80 }
91 81
92 PP_Resource ResourceCreationImpl::CreateBrowserFont( 82 PP_Resource ResourceCreationImpl::CreateBrowserFont(
93 PP_Instance instance, 83 PP_Instance instance,
94 const PP_BrowserFont_Trusted_Description* description) { 84 const PP_BrowserFont_Trusted_Description* description) {
95 PluginInstance* plugin_instance = 85 PluginInstance* plugin_instance =
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 wheel_delta, wheel_ticks, scroll_by_page); 299 wheel_delta, wheel_ticks, scroll_by_page);
310 } 300 }
311 301
312 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( 302 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate(
313 PP_Instance instance) { 303 PP_Instance instance) {
314 return PPB_X509Certificate_Private_Impl::CreateResource(instance); 304 return PPB_X509Certificate_Private_Impl::CreateResource(instance);
315 } 305 }
316 306
317 } // namespace ppapi 307 } // namespace ppapi
318 } // namespace webkit 308 } // namespace webkit
OLDNEW
« ppapi/proxy/ppapi_messages.h ('K') | « 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