Index: ash/accelerators/accelerator_table.h |
diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h |
index 089e24050ffee760166ee32774a240f4e6cd50f8..ff5251c5fafe67c1ab1ab4ce058a0c68848f443e 100644 |
--- a/ash/accelerators/accelerator_table.h |
+++ b/ash/accelerators/accelerator_table.h |
@@ -152,10 +152,43 @@ struct AcceleratorData { |
AcceleratorAction action; |
}; |
+// Gathers the needed data to handle deprecated accelerators. |
+struct DeprecatedAcceleratorData { |
+ // The old deprecated accelerator. |
+ AcceleratorData deprecated_accelerator; |
+ |
+ // The name of the UMA histogram that will be used to measure the deprecated |
+ // v.s. new accelerator usage. |
+ const char* uma_histogram_name; |
+ |
+ // The ID of the localized notification message to show to users informing |
+ // them about the deprecation. |
+ int notification_message_id; |
+ |
+ // Specifies whether the deprecated accelerator is still enabled to do its |
+ // associated action. |
+ bool deprecated_enabled; |
+}; |
+ |
+// This will be used for the UMA stats to measure the how many users are using |
+// the old v.s. new accelerators. |
+enum DeprecatedAcceleratorUsage { |
+ DEPRECATED_USED = 0, // The deprecated accelerator is used. |
+ NEW_USED, // The new accelerator is used. |
+ DEPRECATED_USAGE_COUNT, // Maximum value of this enum for histogram use. |
+}; |
+ |
// Accelerators handled by AcceleratorController. |
ASH_EXPORT extern const AcceleratorData kAcceleratorData[]; |
ASH_EXPORT extern const size_t kAcceleratorDataLength; |
+#if defined(OS_CHROMEOS) |
+// The list of the deprecated accelerators along with their new replacing ones |
+// and how to handle them. |
+ASH_EXPORT extern const DeprecatedAcceleratorData kDeprecatedAccelerators[]; |
+ASH_EXPORT extern const size_t kDeprecatedAcceleratorsLength; |
+#endif // defined(OS_CHROMEOS) |
+ |
// Debug accelerators. Debug accelerators are only enabled when the "Debugging |
// keyboard shortcuts" flag (--ash-debug-shortcuts) is enabled. Debug actions |
// are always run (similar to reserved actions). |