OLD | NEW |
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 Loading... |
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 |
OLD | NEW |