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 
5 #ifndef ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_
6 #define ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_
7 
8 namespace ash {
9 
10 // Used for histograms. See tools/metrics/histograms/enums.xml
11 // PowerButtonMenuActionType.
12 enum class PowerButtonMenuActionType {
13   kSignOut,
14   kPowerOff,
15   kDismissByEsc,
16   kDismissByMouse,
17   kDismissByTouch,
18   kLockScreen,
19   kFeedback,
20   kCaptureMode,
21   kMaxValue = kCaptureMode,
22 };
23 
24 void RecordMenuActionHistogram(PowerButtonMenuActionType type);
25 
26 // Used for histograms. See tools/metrics/histograms/enums.xml
27 // PowerButtonPressType.
28 enum class PowerButtonPressType {
29   kTapWithoutMenu,
30   kTapWithMenu,
31   kLongPressToShowMenu,
32   kLongPressWithMenuToShutdown,
33   kLongPressWithoutMenuToShutdown,
34   kMaxValue = kLongPressWithoutMenuToShutdown,
35 };
36 
37 void RecordPressInLaptopModeHistogram(PowerButtonPressType type);
38 void RecordPressInTabletModeHistogram(PowerButtonPressType type);
39 
40 }  // namespace ash
41 
42 #endif  // ASH_SYSTEM_POWER_POWER_BUTTON_MENU_METRICS_TYPE_H_
43