| 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 567 } |
| 568 return false; | 568 return false; |
| 569 } | 569 } |
| 570 case DISABLE_GPU_WATCHDOG: | 570 case DISABLE_GPU_WATCHDOG: |
| 571 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); | 571 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); |
| 572 return true; | 572 return true; |
| 573 #endif | 573 #endif |
| 574 case OPEN_FEEDBACK_PAGE: | 574 case OPEN_FEEDBACK_PAGE: |
| 575 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); | 575 ash::Shell::GetInstance()->delegate()->OpenFeedbackPage(); |
| 576 return true; | 576 return true; |
| 577 case EXIT: | 577 case EXIT_PRESSED: |
| 578 Shell::GetInstance()->delegate()->Exit(); | 578 case EXIT_RELEASED: |
| 579 exit_warning_handler_.HandleExitKey(action == EXIT_PRESSED); |
| 579 return true; | 580 return true; |
| 580 case NEW_INCOGNITO_WINDOW: | 581 case NEW_INCOGNITO_WINDOW: |
| 581 Shell::GetInstance()->delegate()->NewWindow(true /* is_incognito */); | 582 Shell::GetInstance()->delegate()->NewWindow(true /* is_incognito */); |
| 582 return true; | 583 return true; |
| 583 case NEW_TAB: | 584 case NEW_TAB: |
| 584 if (key_code == ui::VKEY_T) | 585 if (key_code == ui::VKEY_T) |
| 585 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEWTAB_T); | 586 shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEWTAB_T); |
| 586 Shell::GetInstance()->delegate()->NewTab(); | 587 Shell::GetInstance()->delegate()->NewTab(); |
| 587 return true; | 588 return true; |
| 588 case NEW_WINDOW: | 589 case NEW_WINDOW: |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 keyboard_brightness_control_delegate) { | 962 keyboard_brightness_control_delegate) { |
| 962 keyboard_brightness_control_delegate_ = | 963 keyboard_brightness_control_delegate_ = |
| 963 keyboard_brightness_control_delegate.Pass(); | 964 keyboard_brightness_control_delegate.Pass(); |
| 964 } | 965 } |
| 965 | 966 |
| 966 bool AcceleratorController::CanHandleAccelerators() const { | 967 bool AcceleratorController::CanHandleAccelerators() const { |
| 967 return true; | 968 return true; |
| 968 } | 969 } |
| 969 | 970 |
| 970 } // namespace ash | 971 } // namespace ash |
| OLD | NEW |