Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: ash/metrics/user_metrics_recorder.cc

Issue 2046843005: mash: Migrate shelf menus to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ash_shell_with_content Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/metrics/user_metrics_recorder.h ('k') | ash/mus/bridge/wm_shelf_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/metrics/user_metrics_recorder.h" 5 #include "ash/metrics/user_metrics_recorder.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shelf/shelf_item_types.h" 8 #include "ash/common/shelf/shelf_item_types.h"
9 #include "ash/common/shelf/shelf_model.h" 9 #include "ash/common/shelf/shelf_model.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 base::RecordAction(base::UserMetricsAction("Mouse_Down")); 285 base::RecordAction(base::UserMetricsAction("Mouse_Down"));
286 break; 286 break;
287 case ash::UMA_PANEL_MINIMIZE_CAPTION_CLICK: 287 case ash::UMA_PANEL_MINIMIZE_CAPTION_CLICK:
288 base::RecordAction( 288 base::RecordAction(
289 base::UserMetricsAction("Panel_Minimize_Caption_Click")); 289 base::UserMetricsAction("Panel_Minimize_Caption_Click"));
290 break; 290 break;
291 case ash::UMA_PANEL_MINIMIZE_CAPTION_GESTURE: 291 case ash::UMA_PANEL_MINIMIZE_CAPTION_GESTURE:
292 base::RecordAction( 292 base::RecordAction(
293 base::UserMetricsAction("Panel_Minimize_Caption_Gesture")); 293 base::UserMetricsAction("Panel_Minimize_Caption_Gesture"));
294 break; 294 break;
295 case ash::UMA_SHELF_ALIGNMENT_SET_BOTTOM:
296 base::RecordAction(
297 base::UserMetricsAction("Shelf_AlignmentSetBottom"));
298 break;
299 case ash::UMA_SHELF_ALIGNMENT_SET_LEFT:
300 base::RecordAction(
301 base::UserMetricsAction("Shelf_AlignmentSetLeft"));
302 break;
303 case ash::UMA_SHELF_ALIGNMENT_SET_RIGHT:
304 base::RecordAction(
305 base::UserMetricsAction("Shelf_AlignmentSetRight"));
306 break;
307 case ash::UMA_STATUS_AREA_AUDIO_CURRENT_INPUT_DEVICE: 295 case ash::UMA_STATUS_AREA_AUDIO_CURRENT_INPUT_DEVICE:
308 base::RecordAction( 296 base::RecordAction(
309 base::UserMetricsAction("StatusArea_Audio_CurrentInputDevice")); 297 base::UserMetricsAction("StatusArea_Audio_CurrentInputDevice"));
310 break; 298 break;
311 case ash::UMA_STATUS_AREA_AUDIO_CURRENT_OUTPUT_DEVICE: 299 case ash::UMA_STATUS_AREA_AUDIO_CURRENT_OUTPUT_DEVICE:
312 base::RecordAction( 300 base::RecordAction(
313 base::UserMetricsAction("StatusArea_Audio_CurrentOutputDevice")); 301 base::UserMetricsAction("StatusArea_Audio_CurrentOutputDevice"));
314 break; 302 break;
315 case ash::UMA_STATUS_AREA_AUDIO_SWITCH_INPUT_DEVICE: 303 case ash::UMA_STATUS_AREA_AUDIO_SWITCH_INPUT_DEVICE:
316 base::RecordAction( 304 base::RecordAction(
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 579
592 void UserMetricsRecorder::RecordUserMetricsAction( 580 void UserMetricsRecorder::RecordUserMetricsAction(
593 wm::WmUserMetricsAction action) { 581 wm::WmUserMetricsAction action) {
594 switch (action) { 582 switch (action) {
595 case wm::WmUserMetricsAction::DRAG_MAXIMIZE_LEFT: 583 case wm::WmUserMetricsAction::DRAG_MAXIMIZE_LEFT:
596 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeLeft")); 584 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeLeft"));
597 break; 585 break;
598 case wm::WmUserMetricsAction::DRAG_MAXIMIZE_RIGHT: 586 case wm::WmUserMetricsAction::DRAG_MAXIMIZE_RIGHT:
599 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeRight")); 587 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeRight"));
600 break; 588 break;
589 case wm::WmUserMetricsAction::SHELF_ALIGNMENT_SET_BOTTOM:
590 base::RecordAction(base::UserMetricsAction("Shelf_AlignmentSetBottom"));
591 break;
592 case wm::WmUserMetricsAction::SHELF_ALIGNMENT_SET_LEFT:
593 base::RecordAction(base::UserMetricsAction("Shelf_AlignmentSetLeft"));
594 break;
595 case wm::WmUserMetricsAction::SHELF_ALIGNMENT_SET_RIGHT:
596 base::RecordAction(base::UserMetricsAction("Shelf_AlignmentSetRight"));
597 break;
601 case wm::WmUserMetricsAction::WINDOW_OVERVIEW: 598 case wm::WmUserMetricsAction::WINDOW_OVERVIEW:
602 base::RecordAction(base::UserMetricsAction("WindowSelector_Overview")); 599 base::RecordAction(base::UserMetricsAction("WindowSelector_Overview"));
603 break; 600 break;
604 case wm::WmUserMetricsAction::WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED: 601 case wm::WmUserMetricsAction::WINDOW_OVERVIEW_ACTIVE_WINDOW_CHANGED:
605 base::RecordAction( 602 base::RecordAction(
606 base::UserMetricsAction("WindowSelector_ActiveWindowChanged")); 603 base::UserMetricsAction("WindowSelector_ActiveWindowChanged"));
607 task_switch_metrics_recorder_.OnTaskSwitch( 604 task_switch_metrics_recorder_.OnTaskSwitch(
608 TaskSwitchMetricsRecorder::OVERVIEW_MODE); 605 TaskSwitchMetricsRecorder::OVERVIEW_MODE);
609 break; 606 break;
610 case wm::WmUserMetricsAction::WINDOW_OVERVIEW_ENTER_KEY: 607 case wm::WmUserMetricsAction::WINDOW_OVERVIEW_ENTER_KEY:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 return IsUserActive() && !IsKioskModeActive(); 657 return IsUserActive() && !IsKioskModeActive();
661 } 658 }
662 659
663 void UserMetricsRecorder::StartTimer() { 660 void UserMetricsRecorder::StartTimer() {
664 timer_.Start(FROM_HERE, 661 timer_.Start(FROM_HERE,
665 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), 662 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds),
666 this, &UserMetricsRecorder::RecordPeriodicMetrics); 663 this, &UserMetricsRecorder::RecordPeriodicMetrics);
667 } 664 }
668 665
669 } // namespace ash 666 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.h ('k') | ash/mus/bridge/wm_shelf_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698