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