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

Unified Diff: content/browser/gamepad/canonical_button_index_list.h

Issue 625543002: Revert of Use the new java_cpp_enum rule in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: content/browser/gamepad/canonical_button_index_list.h
diff --git a/content/browser/gamepad/canonical_button_index_list.h b/content/browser/gamepad/canonical_button_index_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..153ce0ea3dddb9769fd19832202527b19428745d
--- /dev/null
+++ b/content/browser/gamepad/canonical_button_index_list.h
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file intentionally does not have header guards, it's included
+// inside a macro to generate enum values.
+// This defines the canonical button mapping order for gamepad-like devices.
+
+// TODO(SaurabhK): Consolidate with CanonicalButtonIndex enum in
+// gamepad_standard_mappings.h, crbug.com/351558.
+CANONICAL_BUTTON_INDEX(BUTTON_PRIMARY, 0)
+CANONICAL_BUTTON_INDEX(BUTTON_SECONDARY, 1)
+CANONICAL_BUTTON_INDEX(BUTTON_TERTIARY, 2)
+CANONICAL_BUTTON_INDEX(BUTTON_QUATERNARY, 3)
+CANONICAL_BUTTON_INDEX(BUTTON_LEFT_SHOULDER, 4)
+CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_SHOULDER, 5)
+CANONICAL_BUTTON_INDEX(BUTTON_LEFT_TRIGGER, 6)
+CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_TRIGGER, 7)
+CANONICAL_BUTTON_INDEX(BUTTON_BACK_SELECT, 8)
+CANONICAL_BUTTON_INDEX(BUTTON_START, 9)
+CANONICAL_BUTTON_INDEX(BUTTON_LEFT_THUMBSTICK, 10)
+CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_THUMBSTICK, 11)
+CANONICAL_BUTTON_INDEX(BUTTON_DPAD_UP, 12)
+CANONICAL_BUTTON_INDEX(BUTTON_DPAD_DOWN, 13)
+CANONICAL_BUTTON_INDEX(BUTTON_DPAD_LEFT, 14)
+CANONICAL_BUTTON_INDEX(BUTTON_DPAD_RIGHT, 15)
+CANONICAL_BUTTON_INDEX(BUTTON_META, 16)
+CANONICAL_BUTTON_INDEX(NUM_CANONICAL_BUTTONS, 17)
« no previous file with comments | « content/browser/gamepad/canonical_axis_index_list.h ('k') | content/browser/gamepad/gamepad_standard_mappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698