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

Side by Side Diff: content/browser/gamepad/gamepad_service.cc

Issue 2129003002: Refactored gamepad polling to support dynamic sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test issue and Mac XBoxDataFetcher constructor Created 4 years, 5 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
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 "content/browser/gamepad/gamepad_service.h" 5 #include "content/browser/gamepad/gamepad_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 provider_->GetCurrentGamepadData(&gamepads); 171 provider_->GetCurrentGamepadData(&gamepads);
172 for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; ++i) { 172 for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; ++i) {
173 const blink::WebGamepad& pad = gamepads.items[i]; 173 const blink::WebGamepad& pad = gamepads.items[i];
174 if (pad.connected) 174 if (pad.connected)
175 info.consumer->OnGamepadConnected(i, pad); 175 info.consumer->OnGamepadConnected(i, pad);
176 } 176 }
177 } 177 }
178 } 178 }
179 } 179 }
180 180
181 void GamepadService::SetSanitizationEnabled(bool sanitize) {
182 provider_->SetSanitizationEnabled(sanitize);
183 }
184
181 } // namespace content 185 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698