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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 PPB_Gamepad_API* PepperPluginInstanceImpl::GamepadImpl::AsPPB_Gamepad_API() { | 428 PPB_Gamepad_API* PepperPluginInstanceImpl::GamepadImpl::AsPPB_Gamepad_API() { |
429 return this; | 429 return this; |
430 } | 430 } |
431 | 431 |
432 void PepperPluginInstanceImpl::GamepadImpl::Sample( | 432 void PepperPluginInstanceImpl::GamepadImpl::Sample( |
433 PP_Instance instance, | 433 PP_Instance instance, |
434 PP_GamepadsSampleData* data) { | 434 PP_GamepadsSampleData* data) { |
435 WebKit::WebGamepads webkit_data; | 435 WebKit::WebGamepads webkit_data; |
436 RenderThreadImpl::current()->SampleGamepads(&webkit_data); | 436 RenderThreadImpl::current()->SampleGamepads(&webkit_data); |
437 ConvertWebKitGamepadData( | 437 ConvertWebKitGamepadData( |
438 *reinterpret_cast<const ppapi::WebKitGamepads*>(&webkit_data), data); | 438 bit_cast<ppapi::WebKitGamepads>(webkit_data), data); |
439 } | 439 } |
440 | 440 |
441 PepperPluginInstanceImpl::PepperPluginInstanceImpl( | 441 PepperPluginInstanceImpl::PepperPluginInstanceImpl( |
442 RenderViewImpl* render_view, | 442 RenderViewImpl* render_view, |
443 PluginModule* module, | 443 PluginModule* module, |
444 ppapi::PPP_Instance_Combined* instance_interface, | 444 ppapi::PPP_Instance_Combined* instance_interface, |
445 WebPluginContainer* container, | 445 WebPluginContainer* container, |
446 const GURL& plugin_url) | 446 const GURL& plugin_url) |
447 : render_view_(render_view), | 447 : render_view_(render_view), |
448 module_(module), | 448 module_(module), |
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2900 // Running out-of-process. Initiate an IPC call to notify the plugin | 2900 // Running out-of-process. Initiate an IPC call to notify the plugin |
2901 // process. | 2901 // process. |
2902 ppapi::proxy::HostDispatcher* dispatcher = | 2902 ppapi::proxy::HostDispatcher* dispatcher = |
2903 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 2903 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
2904 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 2904 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
2905 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 2905 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
2906 } | 2906 } |
2907 } | 2907 } |
2908 | 2908 |
2909 } // namespace content | 2909 } // namespace content |
OLD | NEW |