File tree 2 files changed +23
-1
lines changed
ash/components/shortcut_viewer/views
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 16
16
#include " ash/public/cpp/shelf_item.h"
17
17
#include " ash/public/cpp/window_properties.h"
18
18
#include " base/i18n/string_search.h"
19
+ #include " base/metrics/user_metrics.h"
20
+ #include " base/metrics/user_metrics_action.h"
19
21
#include " ui/aura/client/aura_constants.h"
20
22
#include " ui/aura/window.h"
21
23
#include " ui/base/default_style.h"
@@ -95,6 +97,9 @@ views::Widget* KeyboardShortcutView::Show(gfx::NativeWindow context) {
95
97
// it.
96
98
g_ksv_view->GetWidget ()->Activate ();
97
99
} else {
100
+ base::RecordAction (
101
+ base::UserMetricsAction (" KeyboardShortcutViewer.CreateWindow" ));
102
+
98
103
constexpr gfx::Size kKSVWindowSize (768 , 512 );
99
104
gfx::Rect window_bounds (kKSVWindowSize );
100
105
if (context) {
@@ -348,7 +353,10 @@ void KeyboardShortcutView::ActiveChanged(
348
353
sender->ShowBackOrGoogleIcon (is_active);
349
354
search_results_container_->SetVisible (is_active);
350
355
tabbed_pane_->SetVisible (!is_active);
351
- if (!is_active) {
356
+ if (is_active) {
357
+ base::RecordAction (
358
+ base::UserMetricsAction (" KeyboardShortcutViewer.Search" ));
359
+ } else {
352
360
search_results_container_->RemoveAllChildViews (true );
353
361
RequestFocusForActiveTab ();
354
362
}
Original file line number Diff line number Diff line change @@ -8263,6 +8263,20 @@ should be able to be added at any place in this file.
8263
8263
<description>Please enter the description of this user action.</description>
8264
8264
</action>
8265
8265
8266
+ <action name="KeyboardShortcutViewer.CreateWindow">
8267
+
8268
+ <description>
8269
+ Records when the user creates a new window of Keyboard Shortcut Viewer.
8270
+ </description>
8271
+ </action>
8272
+
8273
+ <action name="KeyboardShortcutViewer.Search">
8274
+
8275
+ <description>
8276
+ Records when the user enters search mode in Keyboard Shortcut Viewer.
8277
+ </description>
8278
+ </action>
8279
+
8266
8280
<action name="KeywordEditor_AddKeyword">
8267
8281
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
8268
8282
<description>Please enter the description of this user action.</description>
You can’t perform that action at this time.
0 commit comments