OLD | NEW |
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 <iostream> | 9 #include <iostream> |
10 #include <string> | 10 #include <string> |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 return false; | 575 return false; |
576 } | 576 } |
577 case DISABLE_GPU_WATCHDOG: | 577 case DISABLE_GPU_WATCHDOG: |
578 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); | 578 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); |
579 return true; | 579 return true; |
580 #endif | 580 #endif |
581 case OPEN_FEEDBACK_PAGE: | 581 case OPEN_FEEDBACK_PAGE: |
582 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); | 582 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); |
583 return true; | 583 return true; |
584 case EXIT: | 584 case EXIT: |
| 585 // UMA metrics are recorded in the handler. |
585 exit_warning_handler_.HandleAccelerator(); | 586 exit_warning_handler_.HandleAccelerator(); |
586 return true; | 587 return true; |
587 case NEW_INCOGNITO_WINDOW: | 588 case NEW_INCOGNITO_WINDOW: |
588 Shell::GetInstance()->delegate()->NewWindow(true /* is_incognito */); | 589 Shell::GetInstance()->delegate()->NewWindow(true /* is_incognito */); |
589 return true; | 590 return true; |
590 case NEW_TAB: | 591 case NEW_TAB: |
591 if (key_code == ui::VKEY_T) | 592 if (key_code == ui::VKEY_T) |
592 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEWTAB_T); | 593 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEWTAB_T); |
593 Shell::GetInstance()->delegate()->NewTab(); | 594 Shell::GetInstance()->delegate()->NewTab(); |
594 return true; | 595 return true; |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 keyboard_brightness_control_delegate) { | 965 keyboard_brightness_control_delegate) { |
965 keyboard_brightness_control_delegate_ = | 966 keyboard_brightness_control_delegate_ = |
966 keyboard_brightness_control_delegate.Pass(); | 967 keyboard_brightness_control_delegate.Pass(); |
967 } | 968 } |
968 | 969 |
969 bool AcceleratorController::CanHandleAccelerators() const { | 970 bool AcceleratorController::CanHandleAccelerators() const { |
970 return true; | 971 return true; |
971 } | 972 } |
972 | 973 |
973 } // namespace ash | 974 } // namespace ash |
OLD | NEW |