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

Side by Side Diff: ppapi/proxy/resource_creation_proxy.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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/ppb_audio_input_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/audio_input_resource.h"
10 #include "ppapi/proxy/connection.h" 11 #include "ppapi/proxy/connection.h"
11 #include "ppapi/proxy/file_chooser_resource.h" 12 #include "ppapi/proxy/file_chooser_resource.h"
12 #include "ppapi/proxy/flash_device_id_resource.h" 13 #include "ppapi/proxy/flash_device_id_resource.h"
13 #include "ppapi/proxy/flash_font_file_resource.h" 14 #include "ppapi/proxy/flash_font_file_resource.h"
14 #include "ppapi/proxy/plugin_dispatcher.h" 15 #include "ppapi/proxy/plugin_dispatcher.h"
15 #include "ppapi/proxy/plugin_globals.h" 16 #include "ppapi/proxy/plugin_globals.h"
16 #include "ppapi/proxy/plugin_proxy_delegate.h" 17 #include "ppapi/proxy/plugin_proxy_delegate.h"
17 #include "ppapi/proxy/plugin_resource_tracker.h" 18 #include "ppapi/proxy/plugin_resource_tracker.h"
18 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
19 #include "ppapi/proxy/ppb_audio_input_proxy.h"
20 #include "ppapi/proxy/ppb_audio_proxy.h" 20 #include "ppapi/proxy/ppb_audio_proxy.h"
21 #include "ppapi/proxy/ppb_buffer_proxy.h" 21 #include "ppapi/proxy/ppb_buffer_proxy.h"
22 #include "ppapi/proxy/ppb_broker_proxy.h" 22 #include "ppapi/proxy/ppb_broker_proxy.h"
23 #include "ppapi/proxy/ppb_file_io_proxy.h" 23 #include "ppapi/proxy/ppb_file_io_proxy.h"
24 #include "ppapi/proxy/ppb_file_ref_proxy.h" 24 #include "ppapi/proxy/ppb_file_ref_proxy.h"
25 #include "ppapi/proxy/ppb_file_system_proxy.h" 25 #include "ppapi/proxy/ppb_file_system_proxy.h"
26 #include "ppapi/proxy/ppb_flash_menu_proxy.h" 26 #include "ppapi/proxy/ppb_flash_menu_proxy.h"
27 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" 27 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h"
28 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" 28 #include "ppapi/proxy/ppb_graphics_2d_proxy.h"
29 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 29 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { 261 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) {
262 return (new WebSocketResource(GetConnection(), instance))->GetReference(); 262 return (new WebSocketResource(GetConnection(), instance))->GetReference();
263 } 263 }
264 264
265 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( 265 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate(
266 PP_Instance instance) { 266 PP_Instance instance) {
267 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); 267 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance);
268 } 268 }
269 269
270 #if !defined(OS_NACL) 270 #if !defined(OS_NACL)
271 PP_Resource ResourceCreationProxy::CreateAudioInput0_1(
272 PP_Instance instance,
273 PP_Resource config_id,
274 PPB_AudioInput_Callback audio_input_callback,
275 void* user_data) {
276 return PPB_AudioInput_Proxy::CreateProxyResource0_1(instance, config_id,
277 audio_input_callback,
278 user_data);
279 }
280
281 PP_Resource ResourceCreationProxy::CreateAudioInput( 271 PP_Resource ResourceCreationProxy::CreateAudioInput(
282 PP_Instance instance) { 272 PP_Instance instance) {
283 return PPB_AudioInput_Proxy::CreateProxyResource(instance); 273 return (new AudioInputResource(GetConnection(), instance))->GetReference();
284 } 274 }
285 275
286 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { 276 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) {
287 return PPB_Broker_Proxy::CreateProxyResource(instance); 277 return PPB_Broker_Proxy::CreateProxyResource(instance);
288 } 278 }
289 279
290 PP_Resource ResourceCreationProxy::CreateBrowserFont( 280 PP_Resource ResourceCreationProxy::CreateBrowserFont(
291 PP_Instance instance, 281 PP_Instance instance,
292 const PP_BrowserFont_Trusted_Description* description) { 282 const PP_BrowserFont_Trusted_Description* description) {
293 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 283 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 366 }
377 367
378 Connection ResourceCreationProxy::GetConnection() { 368 Connection ResourceCreationProxy::GetConnection() {
379 return Connection( 369 return Connection(
380 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), 370 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
381 dispatcher()); 371 dispatcher());
382 } 372 }
383 373
384 } // namespace proxy 374 } // namespace proxy
385 } // namespace ppapi 375 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/ppb_audio_input_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698