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

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

Issue 13771020: Add Pepper VideoReader and VideoWriter plumbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | 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 "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 25 matching lines...) Expand all
36 #include "ppapi/proxy/ppb_url_loader_proxy.h" 36 #include "ppapi/proxy/ppb_url_loader_proxy.h"
37 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 37 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
38 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" 38 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
39 #include "ppapi/proxy/printing_resource.h" 39 #include "ppapi/proxy/printing_resource.h"
40 #include "ppapi/proxy/talk_resource.h" 40 #include "ppapi/proxy/talk_resource.h"
41 #include "ppapi/proxy/truetype_font_resource.h" 41 #include "ppapi/proxy/truetype_font_resource.h"
42 #include "ppapi/proxy/udp_socket_private_resource.h" 42 #include "ppapi/proxy/udp_socket_private_resource.h"
43 #include "ppapi/proxy/url_request_info_resource.h" 43 #include "ppapi/proxy/url_request_info_resource.h"
44 #include "ppapi/proxy/url_response_info_resource.h" 44 #include "ppapi/proxy/url_response_info_resource.h"
45 #include "ppapi/proxy/video_capture_resource.h" 45 #include "ppapi/proxy/video_capture_resource.h"
46 #include "ppapi/proxy/video_reader_resource.h"
47 #include "ppapi/proxy/video_writer_resource.h"
46 #include "ppapi/proxy/websocket_resource.h" 48 #include "ppapi/proxy/websocket_resource.h"
47 #include "ppapi/shared_impl/api_id.h" 49 #include "ppapi/shared_impl/api_id.h"
48 #include "ppapi/shared_impl/host_resource.h" 50 #include "ppapi/shared_impl/host_resource.h"
49 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 51 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
50 #include "ppapi/shared_impl/ppb_input_event_shared.h" 52 #include "ppapi/shared_impl/ppb_input_event_shared.h"
51 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 53 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
52 #include "ppapi/shared_impl/var.h" 54 #include "ppapi/shared_impl/var.h"
53 #include "ppapi/thunk/enter.h" 55 #include "ppapi/thunk/enter.h"
54 #include "ppapi/thunk/ppb_image_data_api.h" 56 #include "ppapi/thunk/ppb_image_data_api.h"
55 57
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 383 }
382 384
383 PP_Resource ResourceCreationProxy::CreateVideoDecoder( 385 PP_Resource ResourceCreationProxy::CreateVideoDecoder(
384 PP_Instance instance, 386 PP_Instance instance,
385 PP_Resource context3d_id, 387 PP_Resource context3d_id,
386 PP_VideoDecoder_Profile profile) { 388 PP_VideoDecoder_Profile profile) {
387 return PPB_VideoDecoder_Proxy::CreateProxyResource( 389 return PPB_VideoDecoder_Proxy::CreateProxyResource(
388 instance, context3d_id, profile); 390 instance, context3d_id, profile);
389 } 391 }
390 392
393 PP_Resource ResourceCreationProxy::CreateVideoReader(
394 PP_Instance instance) {
395 return (new VideoReaderResource(GetConnection(), instance))->GetReference();
396 }
397
398 PP_Resource ResourceCreationProxy::CreateVideoWriter(
399 PP_Instance instance) {
400 return (new VideoWriterResource(GetConnection(), instance))->GetReference();
401 }
402
391 #endif // !defined(OS_NACL) 403 #endif // !defined(OS_NACL)
392 404
393 bool ResourceCreationProxy::Send(IPC::Message* msg) { 405 bool ResourceCreationProxy::Send(IPC::Message* msg) {
394 return dispatcher()->Send(msg); 406 return dispatcher()->Send(msg);
395 } 407 }
396 408
397 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 409 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
398 return false; 410 return false;
399 } 411 }
400 412
401 Connection ResourceCreationProxy::GetConnection() { 413 Connection ResourceCreationProxy::GetConnection() {
402 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 414 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
403 } 415 }
404 416
405 } // namespace proxy 417 } // namespace proxy
406 } // namespace ppapi 418 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698