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

Side by Side Diff: content/browser/gamepad/gamepad_standard_mappings_mac.mm

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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 <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 MapperXbox360Gamepad(const blink::WebGamepad& input, 14 void MapperXbox360Gamepad(const blink::WebGamepad& input,
12 blink::WebGamepad* mapped) { 15 blink::WebGamepad* mapped) {
13 *mapped = input; 16 *mapped = input;
14 mapped->buttons[BUTTON_INDEX_LEFT_TRIGGER] = AxisToButton(input.axes[2]); 17 mapped->buttons[BUTTON_INDEX_LEFT_TRIGGER] = AxisToButton(input.axes[2]);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const base::StringPiece& product_id) { 291 const base::StringPiece& product_id) {
289 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) { 292 for (size_t i = 0; i < arraysize(AvailableMappings); ++i) {
290 MappingData& item = AvailableMappings[i]; 293 MappingData& item = AvailableMappings[i];
291 if (vendor_id == item.vendor_id && product_id == item.product_id) 294 if (vendor_id == item.vendor_id && product_id == item.product_id)
292 return item.function; 295 return item.function;
293 } 296 }
294 return NULL; 297 return NULL;
295 } 298 }
296 299
297 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_standard_mappings_linux.cc ('k') | content/browser/gamepad/gamepad_standard_mappings_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698