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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 | 320 |
321 PluginInstance::GamepadImpl::GamepadImpl(PluginDelegate* delegate) | 321 PluginInstance::GamepadImpl::GamepadImpl(PluginDelegate* delegate) |
322 : Resource(::ppapi::Resource::Untracked()), | 322 : Resource(::ppapi::Resource::Untracked()), |
323 delegate_(delegate) { | 323 delegate_(delegate) { |
324 } | 324 } |
325 | 325 |
326 PPB_Gamepad_API* PluginInstance::GamepadImpl::AsPPB_Gamepad_API() { | 326 PPB_Gamepad_API* PluginInstance::GamepadImpl::AsPPB_Gamepad_API() { |
327 return this; | 327 return this; |
328 } | 328 } |
329 | 329 |
330 void PluginInstance::GamepadImpl::Sample(PP_GamepadsSampleData* data) { | 330 void PluginInstance::GamepadImpl::Sample(PP_Instance instance, |
dmichael (off chromium)
2013/03/19 19:01:06
nit: we usually omit or put the param name in /**/
teravest
2013/03/19 19:39:33
Done.
| |
331 PP_GamepadsSampleData* data) { | |
331 WebKit::WebGamepads webkit_data; | 332 WebKit::WebGamepads webkit_data; |
332 delegate_->SampleGamepads(&webkit_data); | 333 delegate_->SampleGamepads(&webkit_data); |
333 ConvertWebKitGamepadData( | 334 ConvertWebKitGamepadData( |
334 *reinterpret_cast<const ::ppapi::WebKitGamepads*>(&webkit_data), data); | 335 *reinterpret_cast<const ::ppapi::WebKitGamepads*>(&webkit_data), data); |
335 } | 336 } |
336 | 337 |
337 PluginInstance::PluginInstance( | 338 PluginInstance::PluginInstance( |
338 PluginDelegate* delegate, | 339 PluginDelegate* delegate, |
339 PluginModule* module, | 340 PluginModule* module, |
340 ::ppapi::PPP_Instance_Combined* instance_interface, | 341 ::ppapi::PPP_Instance_Combined* instance_interface, |
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2488 screen_size_for_fullscreen_ = gfx::Size(); | 2489 screen_size_for_fullscreen_ = gfx::Size(); |
2489 WebElement element = container_->element(); | 2490 WebElement element = container_->element(); |
2490 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2491 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
2491 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2492 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
2492 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2493 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
2493 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2494 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
2494 } | 2495 } |
2495 | 2496 |
2496 } // namespace ppapi | 2497 } // namespace ppapi |
2497 } // namespace webkit | 2498 } // namespace webkit |
OLD | NEW |