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

Unified Diff: third_party/WebKit/Source/modules/gamepad/Gamepad.cpp

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
diff --git a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
index f7772a9ece77fa0fe9c519ca5379706497e97862..efaba77b9cadf14ca36d64358c8b998ee6fb8749 100644
--- a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
+++ b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
@@ -37,7 +37,7 @@ void Gamepad::SetAxes(unsigned count, const double* data) {
std::copy(data, data + count, axes_.begin());
}
-void Gamepad::SetButtons(unsigned count, const WebGamepadButton* data) {
+void Gamepad::SetButtons(unsigned count, const device::GamepadButton* data) {
if (buttons_.size() != count) {
buttons_.Resize(count);
for (unsigned i = 0; i < count; ++i)
@@ -51,7 +51,7 @@ void Gamepad::SetButtons(unsigned count, const WebGamepadButton* data) {
}
}
-void Gamepad::SetPose(const WebGamepadPose& pose) {
+void Gamepad::SetPose(const device::GamepadPose& pose) {
if (!pose.not_null) {
if (pose_)
pose_ = nullptr;
@@ -64,15 +64,15 @@ void Gamepad::SetPose(const WebGamepadPose& pose) {
pose_->SetPose(pose);
}
-void Gamepad::SetHand(const WebGamepadHand& hand) {
+void Gamepad::SetHand(const device::GamepadHand& hand) {
switch (hand) {
- case kGamepadHandNone:
+ case device::GamepadHand::kNone:
hand_ = "";
break;
- case kGamepadHandLeft:
+ case device::GamepadHand::kLeft:
hand_ = "left";
break;
- case kGamepadHandRight:
+ case device::GamepadHand::kRight:
hand_ = "right";
break;
default:
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/Gamepad.h ('k') | third_party/WebKit/Source/modules/gamepad/GamepadDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698