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

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: clean up code 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..f3fd00da53d45d08339ada64e5efca730e330a41 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::kGamepadHandNone:
hand_ = "";
break;
- case kGamepadHandLeft:
+ case device::kGamepadHandLeft:
hand_ = "left";
break;
- case kGamepadHandRight:
+ case device::kGamepadHandRight:
hand_ = "right";
break;
default:

Powered by Google App Engine
This is Rietveld 408576698