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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 12481018: ash: Add metrics for screen lock and shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: report metric before requesting lock Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/shell_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 10
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 case CYCLE_FORWARD_LINEAR: 461 case CYCLE_FORWARD_LINEAR:
462 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP1) 462 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP1)
463 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEXTWINDOW_F5); 463 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEXTWINDOW_F5);
464 HandleCycleWindowLinear(CYCLE_FORWARD); 464 HandleCycleWindowLinear(CYCLE_FORWARD);
465 return true; 465 return true;
466 #if defined(OS_CHROMEOS) 466 #if defined(OS_CHROMEOS)
467 case CYCLE_DISPLAY_MODE: 467 case CYCLE_DISPLAY_MODE:
468 Shell::GetInstance()->display_controller()->CycleDisplayMode(); 468 Shell::GetInstance()->display_controller()->CycleDisplayMode();
469 return true; 469 return true;
470 case LOCK_SCREEN: 470 case LOCK_SCREEN:
471 if (key_code == ui::VKEY_L)
472 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_LOCK_SCREEN_L);
471 return HandleLock(); 473 return HandleLock();
472 case OPEN_FILE_DIALOG: 474 case OPEN_FILE_DIALOG:
473 return HandleFileManager(true /* as_dialog */); 475 return HandleFileManager(true /* as_dialog */);
474 case OPEN_FILE_MANAGER: 476 case OPEN_FILE_MANAGER:
475 return HandleFileManager(false /* as_dialog */); 477 return HandleFileManager(false /* as_dialog */);
476 case OPEN_CROSH: 478 case OPEN_CROSH:
477 return HandleCrosh(); 479 return HandleCrosh();
478 case SWAP_PRIMARY_DISPLAY: 480 case SWAP_PRIMARY_DISPLAY:
479 Shell::GetInstance()->display_controller()->SwapPrimaryDisplay(); 481 Shell::GetInstance()->display_controller()->SwapPrimaryDisplay();
480 return true; 482 return true;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 keyboard_brightness_control_delegate) { 864 keyboard_brightness_control_delegate) {
863 keyboard_brightness_control_delegate_ = 865 keyboard_brightness_control_delegate_ =
864 keyboard_brightness_control_delegate.Pass(); 866 keyboard_brightness_control_delegate.Pass();
865 } 867 }
866 868
867 bool AcceleratorController::CanHandleAccelerators() const { 869 bool AcceleratorController::CanHandleAccelerators() const {
868 return true; 870 return true;
869 } 871 }
870 872
871 } // namespace ash 873 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698