| 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 <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
| 5 #include "content/browser/gamepad/gamepad_standard_mappings.h" | 8 #include "content/browser/gamepad/gamepad_standard_mappings.h" |
| 6 | 9 |
| 7 namespace content { | 10 namespace content { |
| 8 | 11 |
| 9 namespace { | 12 namespace { |
| 10 | 13 |
| 11 void MapperLogitechDualAction(const blink::WebGamepad& input, | 14 void MapperLogitechDualAction(const blink::WebGamepad& input, |
| 12 blink::WebGamepad* mapped) { | 15 blink::WebGamepad* mapped) { |
| 13 *mapped = input; | 16 *mapped = input; |
| 14 mapped->buttons[BUTTON_INDEX_PRIMARY] = input.buttons[1]; | 17 mapped->buttons[BUTTON_INDEX_PRIMARY] = input.buttons[1]; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 const base::StringPiece& product_id) { | 187 const base::StringPiece& product_id) { |
| 185 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { | 188 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { |
| 186 MappingData& item = AvailableMappings[i]; | 189 MappingData& item = AvailableMappings[i]; |
| 187 if (vendor_id == item.vendor_id && product_id == item.product_id) | 190 if (vendor_id == item.vendor_id && product_id == item.product_id) |
| 188 return item.function; | 191 return item.function; |
| 189 } | 192 } |
| 190 return NULL; | 193 return NULL; |
| 191 } | 194 } |
| 192 | 195 |
| 193 } // namespace content | 196 } // namespace content |
| OLD | NEW |