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

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

Issue 7553003: Video Capture Pepper API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/input_event_impl.h" 8 #include "ppapi/shared_impl/input_event_impl.h"
9 #include "webkit/plugins/ppapi/common.h" 9 #include "webkit/plugins/ppapi/common.h"
10 #include "webkit/plugins/ppapi/ppb_audio_impl.h" 10 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
(...skipping 10 matching lines...) Expand all
21 #include "webkit/plugins/ppapi/ppb_font_impl.h" 21 #include "webkit/plugins/ppapi/ppb_font_impl.h"
22 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" 22 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
23 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 23 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
24 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 24 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
25 #include "webkit/plugins/ppapi/ppb_input_event_impl.h" 25 #include "webkit/plugins/ppapi/ppb_input_event_impl.h"
26 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" 26 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h"
27 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" 27 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h"
28 #include "webkit/plugins/ppapi/ppb_transport_impl.h" 28 #include "webkit/plugins/ppapi/ppb_transport_impl.h"
29 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" 29 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
30 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 30 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
31 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h"
31 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" 32 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
32 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" 33 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
33 #include "webkit/plugins/ppapi/var.h" 34 #include "webkit/plugins/ppapi/var.h"
34 35
35 using ppapi::InputEventData; 36 using ppapi::InputEventData;
36 37
37 namespace webkit { 38 namespace webkit {
38 namespace ppapi { 39 namespace ppapi {
39 40
40 namespace { 41 namespace {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 277 }
277 278
278 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { 279 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) {
279 return ReturnResource(new PPB_URLLoader_Impl(instance_, false)); 280 return ReturnResource(new PPB_URLLoader_Impl(instance_, false));
280 } 281 }
281 282
282 PP_Resource ResourceCreationImpl::CreateURLRequestInfo(PP_Instance instance) { 283 PP_Resource ResourceCreationImpl::CreateURLRequestInfo(PP_Instance instance) {
283 return ReturnResource(new PPB_URLRequestInfo_Impl(instance_)); 284 return ReturnResource(new PPB_URLRequestInfo_Impl(instance_));
284 } 285 }
285 286
287 PP_Resource ResourceCreationImpl::CreateVideoCapture(PP_Instance instance) {
288 scoped_refptr<PPB_VideoCapture_Impl> video_capture =
289 new PPB_VideoCapture_Impl(instance_);
290 if (!video_capture->Init())
291 return 0;
292 return ReturnResource(video_capture);
293 }
294
286 PP_Resource ResourceCreationImpl::CreateVideoDecoder( 295 PP_Resource ResourceCreationImpl::CreateVideoDecoder(
287 PP_Instance instance, 296 PP_Instance instance,
288 PP_Resource context3d_id, 297 PP_Resource context3d_id,
289 const PP_VideoConfigElement* config) { 298 const PP_VideoConfigElement* config) {
290 return PPB_VideoDecoder_Impl::Create(instance_, context3d_id, config); 299 return PPB_VideoDecoder_Impl::Create(instance_, context3d_id, config);
291 } 300 }
292 301
293 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, 302 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance,
294 PP_VideoLayerMode_Dev mode) { 303 PP_VideoLayerMode_Dev mode) {
295 return PPB_VideoLayer_Impl::Create(instance_, mode); 304 return PPB_VideoLayer_Impl::Create(instance_, mode);
(...skipping 12 matching lines...) Expand all
308 data.event_modifiers = modifiers; 317 data.event_modifiers = modifiers;
309 data.wheel_delta = *wheel_delta; 318 data.wheel_delta = *wheel_delta;
310 data.wheel_ticks = *wheel_ticks; 319 data.wheel_ticks = *wheel_ticks;
311 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); 320 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
312 321
313 return PPB_InputEvent_Impl::Create(instance_, data); 322 return PPB_InputEvent_Impl::Create(instance_, data);
314 } 323 }
315 324
316 } // namespace ppapi 325 } // namespace ppapi
317 } // namespace webkit 326 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698