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

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

Issue 11274036: Refactor video capture to new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: export 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
« no previous file with comments | « ppapi/proxy/ppb_video_capture_proxy.cc ('k') | ppapi/proxy/resource_message_params.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/audio_input_resource.h"
(...skipping 17 matching lines...) Expand all
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"
30 #include "ppapi/proxy/ppb_host_resolver_private_proxy.h" 30 #include "ppapi/proxy/ppb_host_resolver_private_proxy.h"
31 #include "ppapi/proxy/ppb_image_data_proxy.h" 31 #include "ppapi/proxy/ppb_image_data_proxy.h"
32 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" 32 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h"
33 #include "ppapi/proxy/ppb_talk_private_proxy.h" 33 #include "ppapi/proxy/ppb_talk_private_proxy.h"
34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" 34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h"
35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" 35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h"
36 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" 36 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h"
37 #include "ppapi/proxy/ppb_url_loader_proxy.h" 37 #include "ppapi/proxy/ppb_url_loader_proxy.h"
38 #include "ppapi/proxy/ppb_video_capture_proxy.h"
39 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 38 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
40 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" 39 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
41 #include "ppapi/proxy/printing_resource.h" 40 #include "ppapi/proxy/printing_resource.h"
42 #include "ppapi/proxy/url_request_info_resource.h" 41 #include "ppapi/proxy/url_request_info_resource.h"
42 #include "ppapi/proxy/video_capture_resource.h"
43 #include "ppapi/proxy/websocket_resource.h" 43 #include "ppapi/proxy/websocket_resource.h"
44 #include "ppapi/shared_impl/api_id.h" 44 #include "ppapi/shared_impl/api_id.h"
45 #include "ppapi/shared_impl/host_resource.h" 45 #include "ppapi/shared_impl/host_resource.h"
46 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 46 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
47 #include "ppapi/shared_impl/ppb_input_event_shared.h" 47 #include "ppapi/shared_impl/ppb_input_event_shared.h"
48 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 48 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
49 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" 49 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h"
50 #include "ppapi/shared_impl/var.h" 50 #include "ppapi/shared_impl/var.h"
51 #include "ppapi/thunk/enter.h" 51 #include "ppapi/thunk/enter.h"
52 #include "ppapi/thunk/ppb_image_data_api.h" 52 #include "ppapi/thunk/ppb_image_data_api.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 PP_Bool vertical) { 341 PP_Bool vertical) {
342 NOTIMPLEMENTED(); // Not proxied yet. 342 NOTIMPLEMENTED(); // Not proxied yet.
343 return 0; 343 return 0;
344 } 344 }
345 345
346 PP_Resource ResourceCreationProxy::CreateTalk(PP_Instance instance) { 346 PP_Resource ResourceCreationProxy::CreateTalk(PP_Instance instance) {
347 return PPB_Talk_Private_Proxy::CreateProxyResource(instance); 347 return PPB_Talk_Private_Proxy::CreateProxyResource(instance);
348 } 348 }
349 349
350 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) { 350 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) {
351 return PPB_VideoCapture_Proxy::CreateProxyResource(instance); 351 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
352 if (!dispatcher)
353 return 0;
354 return (new VideoCaptureResource(GetConnection(), instance, dispatcher))
355 ->GetReference();
352 } 356 }
353 357
354 PP_Resource ResourceCreationProxy::CreateVideoDecoder( 358 PP_Resource ResourceCreationProxy::CreateVideoDecoder(
355 PP_Instance instance, 359 PP_Instance instance,
356 PP_Resource context3d_id, 360 PP_Resource context3d_id,
357 PP_VideoDecoder_Profile profile) { 361 PP_VideoDecoder_Profile profile) {
358 return PPB_VideoDecoder_Proxy::CreateProxyResource( 362 return PPB_VideoDecoder_Proxy::CreateProxyResource(
359 instance, context3d_id, profile); 363 instance, context3d_id, profile);
360 } 364 }
361 365
362 #endif // !defined(OS_NACL) 366 #endif // !defined(OS_NACL)
363 367
364 bool ResourceCreationProxy::Send(IPC::Message* msg) { 368 bool ResourceCreationProxy::Send(IPC::Message* msg) {
365 return dispatcher()->Send(msg); 369 return dispatcher()->Send(msg);
366 } 370 }
367 371
368 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 372 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
369 return false; 373 return false;
370 } 374 }
371 375
372 Connection ResourceCreationProxy::GetConnection() { 376 Connection ResourceCreationProxy::GetConnection() {
373 return Connection( 377 return Connection(
374 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), 378 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
375 dispatcher()); 379 dispatcher());
376 } 380 }
377 381
378 } // namespace proxy 382 } // namespace proxy
379 } // namespace ppapi 383 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_video_capture_proxy.cc ('k') | ppapi/proxy/resource_message_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698