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

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

Issue 8571002: WebSocket Pepper API: in process API base implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test name was wrong Created 9 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
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/audio_config_impl.h" 8 #include "ppapi/shared_impl/audio_config_impl.h"
9 #include "ppapi/shared_impl/input_event_impl.h" 9 #include "ppapi/shared_impl/input_event_impl.h"
10 #include "ppapi/shared_impl/var.h" 10 #include "ppapi/shared_impl/var.h"
(...skipping 15 matching lines...) Expand all
26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 26 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
27 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 27 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
28 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" 28 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h"
29 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" 29 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h"
30 #include "webkit/plugins/ppapi/ppb_transport_impl.h" 30 #include "webkit/plugins/ppapi/ppb_transport_impl.h"
31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" 31 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
32 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 32 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
33 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" 33 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h"
34 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" 34 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
35 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h" 35 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
36 #include "webkit/plugins/ppapi/ppb_websocket_impl.h"
36 37
37 using ppapi::InputEventData; 38 using ppapi::InputEventData;
38 using ppapi::InputEventImpl; 39 using ppapi::InputEventImpl;
39 using ppapi::StringVar; 40 using ppapi::StringVar;
40 41
41 namespace webkit { 42 namespace webkit {
42 namespace ppapi { 43 namespace ppapi {
43 44
44 ResourceCreationImpl::ResourceCreationImpl(PluginInstance* instance) { 45 ResourceCreationImpl::ResourceCreationImpl(PluginInstance* instance) {
45 } 46 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 PP_Resource context3d_id, 301 PP_Resource context3d_id,
301 PP_VideoDecoder_Profile profile) { 302 PP_VideoDecoder_Profile profile) {
302 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, profile); 303 return PPB_VideoDecoder_Impl::Create(instance, context3d_id, profile);
303 } 304 }
304 305
305 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance, 306 PP_Resource ResourceCreationImpl::CreateVideoLayer(PP_Instance instance,
306 PP_VideoLayerMode_Dev mode) { 307 PP_VideoLayerMode_Dev mode) {
307 return PPB_VideoLayer_Impl::Create(instance, mode); 308 return PPB_VideoLayer_Impl::Create(instance, mode);
308 } 309 }
309 310
311 PP_Resource ResourceCreationImpl::CreateWebSocket(PP_Instance instance) {
312 return PPB_WebSocket_Impl::Create(instance);
313 }
314
310 PP_Resource ResourceCreationImpl::CreateWheelInputEvent( 315 PP_Resource ResourceCreationImpl::CreateWheelInputEvent(
311 PP_Instance instance, 316 PP_Instance instance,
312 PP_TimeTicks time_stamp, 317 PP_TimeTicks time_stamp,
313 uint32_t modifiers, 318 uint32_t modifiers,
314 const PP_FloatPoint* wheel_delta, 319 const PP_FloatPoint* wheel_delta,
315 const PP_FloatPoint* wheel_ticks, 320 const PP_FloatPoint* wheel_ticks,
316 PP_Bool scroll_by_page) { 321 PP_Bool scroll_by_page) {
317 InputEventData data; 322 InputEventData data;
318 data.event_type = PP_INPUTEVENT_TYPE_WHEEL; 323 data.event_type = PP_INPUTEVENT_TYPE_WHEEL;
319 data.event_time_stamp = time_stamp; 324 data.event_time_stamp = time_stamp;
320 data.event_modifiers = modifiers; 325 data.event_modifiers = modifiers;
321 data.wheel_delta = *wheel_delta; 326 data.wheel_delta = *wheel_delta;
322 data.wheel_ticks = *wheel_ticks; 327 data.wheel_ticks = *wheel_ticks;
323 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); 328 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
324 329
325 return (new InputEventImpl(InputEventImpl::InitAsImpl(), 330 return (new InputEventImpl(InputEventImpl::InitAsImpl(),
326 instance, data))->GetReference(); 331 instance, data))->GetReference();
327 } 332 }
328 333
329 } // namespace ppapi 334 } // namespace ppapi
330 } // namespace webkit 335 } // namespace webkit
OLDNEW
« ppapi/tests/test_websocket.cc ('K') | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698