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

Unified Diff: device/gamepad/gamepad_provider.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: device/gamepad/gamepad_provider.cc
diff --git a/device/gamepad/gamepad_provider.cc b/device/gamepad/gamepad_provider.cc
index 470bf4527119fde755160cfdb5c5c2cf1cb5d87e..7982918455721a8352065d6eafdc6bef3523c3b8 100644
--- a/device/gamepad/gamepad_provider.cc
+++ b/device/gamepad/gamepad_provider.cc
@@ -265,13 +265,10 @@ void GamepadProvider::DoPoll() {
// Acquire the SeqLock. There is only ever one writer to this data.
// See gamepad_shared_buffer.h.
gamepad_shared_buffer_->WriteBegin();
- buffer->length = 0;
for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
PadState& state = pad_states_.get()[i];
// Must run through the map+sanitize here or CheckForUserGesture may fail.
MapAndSanitizeGamepadData(&state, &buffer->items[i], sanitize_);
- if (state.active_state)
- buffer->length++;
}
gamepad_shared_buffer_->WriteEnd();
}
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc ('k') | device/gamepad/gamepad_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698