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

Unified Diff: components/test_runner/gamepad_controller.cc

Issue 2572323002: Delete WebGamepads::length. (Closed)
Patch Set: Rebase Created 3 years, 11 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: components/test_runner/gamepad_controller.cc
diff --git a/components/test_runner/gamepad_controller.cc b/components/test_runner/gamepad_controller.cc
index 18c2fa46aceec90c1b5fb185655a3e02c459fe49..a30e22182c97eacb363d593fe9f4adce537ad43c 100644
--- a/components/test_runner/gamepad_controller.cc
+++ b/components/test_runner/gamepad_controller.cc
@@ -178,11 +178,6 @@ void GamepadController::Connect(int index) {
if (index < 0 || index >= static_cast<int>(WebGamepads::itemsLengthCap))
return;
gamepads_.items[index].connected = true;
- gamepads_.length = 0;
- for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
- if (gamepads_.items[i].connected)
- gamepads_.length = i + 1;
- }
}
void GamepadController::DispatchConnected(int index) {
@@ -199,11 +194,6 @@ void GamepadController::Disconnect(int index) {
return;
WebGamepad& pad = gamepads_.items[index];
pad.connected = false;
- gamepads_.length = 0;
- for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
- if (gamepads_.items[i].connected)
- gamepads_.length = i + 1;
- }
if (listener_)
listener_->didDisconnectGamepad(index, pad);
}
« no previous file with comments | « components/exo/gamepad_unittest.cc ('k') | content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698