power_button_menu_metrics_type.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_
  5. #define ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_
  6. namespace ash {
  7. // Used for histograms. See tools/metrics/histograms/enums.xml
  8. // PowerButtonMenuActionType.
  9. enum class PowerButtonMenuActionType {
  10. kSignOut,
  11. kPowerOff,
  12. kDismissByEsc,
  13. kDismissByMouse,
  14. kDismissByTouch,
  15. kLockScreen,
  16. kFeedback,
  17. kCaptureMode,
  18. kMaxValue = kCaptureMode,
  19. };
  20. void RecordMenuActionHistogram(PowerButtonMenuActionType type);
  21. // Used for histograms. See tools/metrics/histograms/enums.xml
  22. // PowerButtonPressType.
  23. enum class PowerButtonPressType {
  24. kTapWithoutMenu,
  25. kTapWithMenu,
  26. kLongPressToShowMenu,
  27. kLongPressWithMenuToShutdown,
  28. kLongPressWithoutMenuToShutdown,
  29. kMaxValue = kLongPressWithoutMenuToShutdown,
  30. };
  31. void RecordPressInLaptopModeHistogram(PowerButtonPressType type);
  32. void RecordPressInTabletModeHistogram(PowerButtonPressType type);
  33. } // namespace ash
  34. #endif // ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_