OLD | NEW |
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 "content/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "content/renderer/pepper/ppb_image_data_impl.h" | 54 #include "content/renderer/pepper/ppb_image_data_impl.h" |
55 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 55 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
56 #include "content/renderer/pepper/url_request_info_util.h" | 56 #include "content/renderer/pepper/url_request_info_util.h" |
57 #include "content/renderer/pepper/url_response_info_util.h" | 57 #include "content/renderer/pepper/url_response_info_util.h" |
58 #include "content/renderer/render_frame_impl.h" | 58 #include "content/renderer/render_frame_impl.h" |
59 #include "content/renderer/render_thread_impl.h" | 59 #include "content/renderer/render_thread_impl.h" |
60 #include "content/renderer/render_view_impl.h" | 60 #include "content/renderer/render_view_impl.h" |
61 #include "content/renderer/render_widget.h" | 61 #include "content/renderer/render_widget.h" |
62 #include "content/renderer/render_widget_fullscreen_pepper.h" | 62 #include "content/renderer/render_widget_fullscreen_pepper.h" |
63 #include "content/renderer/sad_plugin.h" | 63 #include "content/renderer/sad_plugin.h" |
| 64 #include "device/gamepad/public/cpp/gamepads.h" |
64 #include "ppapi/c/dev/ppp_text_input_dev.h" | 65 #include "ppapi/c/dev/ppp_text_input_dev.h" |
65 #include "ppapi/c/pp_rect.h" | 66 #include "ppapi/c/pp_rect.h" |
66 #include "ppapi/c/ppb_audio_config.h" | 67 #include "ppapi/c/ppb_audio_config.h" |
67 #include "ppapi/c/ppb_core.h" | 68 #include "ppapi/c/ppb_core.h" |
68 #include "ppapi/c/ppb_gamepad.h" | 69 #include "ppapi/c/ppb_gamepad.h" |
69 #include "ppapi/c/ppp_input_event.h" | 70 #include "ppapi/c/ppp_input_event.h" |
70 #include "ppapi/c/ppp_instance.h" | 71 #include "ppapi/c/ppp_instance.h" |
71 #include "ppapi/c/ppp_messaging.h" | 72 #include "ppapi/c/ppp_messaging.h" |
72 #include "ppapi/c/ppp_mouse_lock.h" | 73 #include "ppapi/c/ppp_mouse_lock.h" |
73 #include "ppapi/c/private/ppb_find_private.h" | 74 #include "ppapi/c/private/ppb_find_private.h" |
(...skipping 17 matching lines...) Expand all Loading... |
91 #include "ppapi/shared_impl/time_conversion.h" | 92 #include "ppapi/shared_impl/time_conversion.h" |
92 #include "ppapi/shared_impl/url_request_info_data.h" | 93 #include "ppapi/shared_impl/url_request_info_data.h" |
93 #include "ppapi/shared_impl/var.h" | 94 #include "ppapi/shared_impl/var.h" |
94 #include "ppapi/thunk/enter.h" | 95 #include "ppapi/thunk/enter.h" |
95 #include "ppapi/thunk/ppb_buffer_api.h" | 96 #include "ppapi/thunk/ppb_buffer_api.h" |
96 #include "printing/features/features.h" | 97 #include "printing/features/features.h" |
97 #include "skia/ext/platform_canvas.h" | 98 #include "skia/ext/platform_canvas.h" |
98 #include "third_party/WebKit/public/platform/URLConversion.h" | 99 #include "third_party/WebKit/public/platform/URLConversion.h" |
99 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 100 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
100 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 101 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
101 #include "third_party/WebKit/public/platform/WebGamepads.h" | |
102 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 102 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
103 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h" | 103 #include "third_party/WebKit/public/platform/WebKeyboardEvent.h" |
104 #include "third_party/WebKit/public/platform/WebMouseEvent.h" | 104 #include "third_party/WebKit/public/platform/WebMouseEvent.h" |
105 #include "third_party/WebKit/public/platform/WebRect.h" | 105 #include "third_party/WebKit/public/platform/WebRect.h" |
106 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 106 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
107 #include "third_party/WebKit/public/platform/WebString.h" | 107 #include "third_party/WebKit/public/platform/WebString.h" |
108 #include "third_party/WebKit/public/platform/WebURL.h" | 108 #include "third_party/WebKit/public/platform/WebURL.h" |
109 #include "third_party/WebKit/public/platform/WebURLError.h" | 109 #include "third_party/WebKit/public/platform/WebURLError.h" |
110 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 110 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
111 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 111 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 451 |
452 PepperPluginInstanceImpl::GamepadImpl::~GamepadImpl() {} | 452 PepperPluginInstanceImpl::GamepadImpl::~GamepadImpl() {} |
453 | 453 |
454 PPB_Gamepad_API* PepperPluginInstanceImpl::GamepadImpl::AsPPB_Gamepad_API() { | 454 PPB_Gamepad_API* PepperPluginInstanceImpl::GamepadImpl::AsPPB_Gamepad_API() { |
455 return this; | 455 return this; |
456 } | 456 } |
457 | 457 |
458 void PepperPluginInstanceImpl::GamepadImpl::Sample( | 458 void PepperPluginInstanceImpl::GamepadImpl::Sample( |
459 PP_Instance instance, | 459 PP_Instance instance, |
460 PP_GamepadsSampleData* data) { | 460 PP_GamepadsSampleData* data) { |
461 blink::WebGamepads webkit_data; | 461 device::Gamepads gamepads_data; |
462 RenderThreadImpl::current()->SampleGamepads(&webkit_data); | 462 RenderThreadImpl::current()->SampleGamepads(&gamepads_data); |
463 ConvertWebKitGamepadData(bit_cast<ppapi::WebKitGamepads>(webkit_data), data); | 463 ppapi::ConvertDeviceGamepadData(gamepads_data, data); |
464 } | 464 } |
465 | 465 |
466 PepperPluginInstanceImpl::PepperPluginInstanceImpl( | 466 PepperPluginInstanceImpl::PepperPluginInstanceImpl( |
467 RenderFrameImpl* render_frame, | 467 RenderFrameImpl* render_frame, |
468 PluginModule* module, | 468 PluginModule* module, |
469 ppapi::PPP_Instance_Combined* instance_interface, | 469 ppapi::PPP_Instance_Combined* instance_interface, |
470 WebPluginContainer* container, | 470 WebPluginContainer* container, |
471 const GURL& plugin_url) | 471 const GURL& plugin_url) |
472 : RenderFrameObserver(render_frame), | 472 : RenderFrameObserver(render_frame), |
473 render_frame_(render_frame), | 473 render_frame_(render_frame), |
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 const cc::TextureMailbox& mailbox) const { | 3453 const cc::TextureMailbox& mailbox) const { |
3454 auto it = | 3454 auto it = |
3455 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3455 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3456 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3456 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3457 return ref_count.first.mailbox() == mailbox.mailbox(); | 3457 return ref_count.first.mailbox() == mailbox.mailbox(); |
3458 }); | 3458 }); |
3459 return it != texture_ref_counts_.end(); | 3459 return it != texture_ref_counts_.end(); |
3460 } | 3460 } |
3461 | 3461 |
3462 } // namespace content | 3462 } // namespace content |
OLD | NEW |