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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
ash / wm / wm_metrics.h [blame]
// Copyright 2022 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_WM_WM_METRICS_H_
#define ASH_WM_WM_METRICS_H_
#include <ostream>
#include "ash/ash_export.h"
namespace ash {
// Used to record different ways to snap a window. Note this should be kept in
// sync with `WindowSnapActionSource` enum in
// tools/metrics/histograms/metadata/ash/enums.xml.
enum class WindowSnapActionSource {
// Default value for any snap action actions that's not covered below.
kNotSpecified,
kDragWindowToEdgeToSnap,
kLongPressCaptionButtonToSnap,
kKeyboardShortcutToSnap,
kDragOrSelectOverviewWindowToSnap,
kLongPressOverviewButtonToSnap,
kDragUpFromShelfToSnap,
kDragDownFromTopToSnap,
kDragTabToSnap,
kAutoSnapInSplitView,
kSnapByWindowStateRestore,
kSnapByWindowLayoutMenu,
kSnapByFullRestoreOrDeskTemplateOrSavedDesk,
kSnapByClamshellTabletTransition,
kSnapByDeskOrSessionChange,
kSnapGroupWindowUpdate,
kTest,
kLacrosSnapButtonOrWindowLayoutMenu,
kSnapBySwapWindowsInSnapGroup,
kMaxValue = kSnapBySwapWindowsInSnapGroup,
};
ASH_EXPORT std::ostream& operator<<(std::ostream& out,
WindowSnapActionSource source);
// Used to save histogram metrics about how the user initiates window snapping.
constexpr char kWindowSnapActionSourceHistogram[] =
"Ash.Wm.WindowSnapActionSource2";
// Used to record the user action on initiating the multi-window resizer.
constexpr char kMultiWindowResizerShow[] = "MultiWindowResizerShow";
// Used to record the user action on initiating the multi-window resizer when
// two windows are snapped.
constexpr char kMultiWindowResizerShowTwoWindowsSnapped[] =
"MultiWindowResizerShow_TwoWindowsSnapped";
// Used to record the user action on clicking on the multi-window resizer.
constexpr char kMultiWindowResizerClick[] = "MultiWindowResizerClick";
// Used to record the user action on clicking on the multi-window resizer when
// two windows are snapped.
constexpr char kMultiWindowResizerClickTwoWindowsSnapped[] =
"MultiWindowResizerClick_TwoWindowsSnapped";
// Used to record the histogram metrics on initiating the multi-window resizer.
constexpr char kMultiWindowResizerShowHistogramName[] =
"Ash.Wm.MultiWindowResizerShow";
// Used to record the histogram metrics on initiating the multi-window resizer
// when two windows are snapped.
constexpr char kMultiWindowResizerShowTwoWindowsSnappedHistogramName[] =
"Ash.Wm.MultiWindowResizerShowTwoWindowsSnapped";
// Used to record the histogram metrics on clicking on the multi-window resizer.
constexpr char kMultiWindowResizerClickHistogramName[] =
"Ash.Wm.MultiWindowResizerClick";
// Used to record the histogram metrics on clicking on the multi-window resizer
// when two windows are snapped.
constexpr char kMultiWindowResizerClickTwoWindowsSnappedHistogramName[] =
"Ash.Wm.MultiWindowResizerClickTwoWindowsSnapped";
// Enum histogram metric for the number of times a window drag results in a
// window split compared to other outcomes. Enum values from
// `ash::WindowSplitter::DragType`.
constexpr char kWindowSplittingDragTypeHistogramName[] =
"Ash.Wm.WindowSplitting.DragType";
// Enum histogram metric for the window region where a window is split.
// Enum values from `ash::WindowSplitter::SplitRegion`.
constexpr char kWindowSplittingSplitRegionHistogramName[] =
"Ash.Wm.WindowSplitting.SplitRegion";
// Time histogram metric for the time duration a user spends dragging when a
// window is split.
constexpr char kWindowSplittingDragDurationPerSplitHistogramName[] =
"Ash.Wm.WindowSplitting.DragDuration.PerSplit";
// Time histogram metric for the time duration a user spends dragging when a
// window is not split.
constexpr char kWindowSplittingDragDurationPerNoSplitHistogramName[] =
"Ash.Wm.WindowSplitting.DragDuration.PerNoSplit";
// Count histogram metric for the number of times the preview is shown when a
// window is split.
constexpr char kWindowSplittingPreviewsShownCountPerSplitDragHistogramName[] =
"Ash.Wm.WindowSplitting.PreviewsShownCount.PerSplit";
// Count histogram metric for the number of times the preview is shown when a
// window is not split.
constexpr char kWindowSplittingPreviewsShownCountPerNoSplitDragHistogramName[] =
"Ash.Wm.WindowSplitting.PreviewsShownCount.PerNoSplit";
} // namespace ash
#endif // ASH_WM_WM_METRICS_H_