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

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: Created 8 years, 2 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
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/connection.h" 10 #include "ppapi/proxy/connection.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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 PP_Bool vertical) { 347 PP_Bool vertical) {
348 NOTIMPLEMENTED(); // Not proxied yet. 348 NOTIMPLEMENTED(); // Not proxied yet.
349 return 0; 349 return 0;
350 } 350 }
351 351
352 PP_Resource ResourceCreationProxy::CreateTalk(PP_Instance instance) { 352 PP_Resource ResourceCreationProxy::CreateTalk(PP_Instance instance) {
353 return PPB_Talk_Private_Proxy::CreateProxyResource(instance); 353 return PPB_Talk_Private_Proxy::CreateProxyResource(instance);
354 } 354 }
355 355
356 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) { 356 PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) {
357 return PPB_VideoCapture_Proxy::CreateProxyResource(instance); 357 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
358 if (!dispatcher)
359 return 0;
360 return (new VideoCaptureResource(GetConnection(), instance, dispatcher))
361 ->GetReference();
358 } 362 }
359 363
360 PP_Resource ResourceCreationProxy::CreateVideoDecoder( 364 PP_Resource ResourceCreationProxy::CreateVideoDecoder(
361 PP_Instance instance, 365 PP_Instance instance,
362 PP_Resource context3d_id, 366 PP_Resource context3d_id,
363 PP_VideoDecoder_Profile profile) { 367 PP_VideoDecoder_Profile profile) {
364 return PPB_VideoDecoder_Proxy::CreateProxyResource( 368 return PPB_VideoDecoder_Proxy::CreateProxyResource(
365 instance, context3d_id, profile); 369 instance, context3d_id, profile);
366 } 370 }
367 371
368 #endif // !defined(OS_NACL) 372 #endif // !defined(OS_NACL)
369 373
370 bool ResourceCreationProxy::Send(IPC::Message* msg) { 374 bool ResourceCreationProxy::Send(IPC::Message* msg) {
371 return dispatcher()->Send(msg); 375 return dispatcher()->Send(msg);
372 } 376 }
373 377
374 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 378 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
375 return false; 379 return false;
376 } 380 }
377 381
378 Connection ResourceCreationProxy::GetConnection() { 382 Connection ResourceCreationProxy::GetConnection() {
379 return Connection( 383 return Connection(
380 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), 384 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
381 dispatcher()); 385 dispatcher());
382 } 386 }
383 387
384 } // namespace proxy 388 } // namespace proxy
385 } // namespace ppapi 389 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698