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

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

Issue 12568010: Cleanup: Make gamepad API consistent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment out unused parameters. Created 7 years, 9 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
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 */,
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
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698