| 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 <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // feature uses. crbug.com/132296 | 486 // feature uses. crbug.com/132296 |
| 487 if (WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled()) | 487 if (WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled()) |
| 488 return false; | 488 return false; |
| 489 } | 489 } |
| 490 return true; | 490 return true; |
| 491 } | 491 } |
| 492 | 492 |
| 493 void HandleToggleAppList(const ui::Accelerator& accelerator) { | 493 void HandleToggleAppList(const ui::Accelerator& accelerator) { |
| 494 if (accelerator.key_code() == ui::VKEY_LWIN) | 494 if (accelerator.key_code() == ui::VKEY_LWIN) |
| 495 base::RecordAction(base::UserMetricsAction("Accel_Search_LWin")); | 495 base::RecordAction(base::UserMetricsAction("Accel_Search_LWin")); |
| 496 Shell::GetInstance()->ToggleAppList(NULL); | 496 WmShell::Get()->ToggleAppList(); |
| 497 } | 497 } |
| 498 | 498 |
| 499 void HandleToggleFullscreen(const ui::Accelerator& accelerator) { | 499 void HandleToggleFullscreen(const ui::Accelerator& accelerator) { |
| 500 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2) | 500 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2) |
| 501 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); | 501 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); |
| 502 accelerators::ToggleFullscreen(); | 502 accelerators::ToggleFullscreen(); |
| 503 } | 503 } |
| 504 | 504 |
| 505 void HandleToggleOverview() { | 505 void HandleToggleOverview() { |
| 506 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5")); | 506 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5")); |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() && | 1408 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() && |
| 1409 actions_needing_window_.find(action) != actions_needing_window_.end()) { | 1409 actions_needing_window_.find(action) != actions_needing_window_.end()) { |
| 1410 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert( | 1410 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert( |
| 1411 A11Y_ALERT_WINDOW_NEEDED); | 1411 A11Y_ALERT_WINDOW_NEEDED); |
| 1412 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; | 1412 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; |
| 1413 } | 1413 } |
| 1414 return RESTRICTION_NONE; | 1414 return RESTRICTION_NONE; |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 } // namespace ash | 1417 } // namespace ash |
| OLD | NEW |