| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_delegate_aura.h" | 5 #include "ash/accelerators/accelerator_controller_delegate_aura.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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 // feature uses. crbug.com/132296 | 329 // feature uses. crbug.com/132296 |
| 330 if (WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled()) | 330 if (WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled()) |
| 331 return false; | 331 return false; |
| 332 } | 332 } |
| 333 return true; | 333 return true; |
| 334 } | 334 } |
| 335 | 335 |
| 336 void HandleToggleAppList(const ui::Accelerator& accelerator) { | 336 void HandleToggleAppList(const ui::Accelerator& accelerator) { |
| 337 if (accelerator.key_code() == ui::VKEY_LWIN) | 337 if (accelerator.key_code() == ui::VKEY_LWIN) |
| 338 base::RecordAction(UserMetricsAction("Accel_Search_LWin")); | 338 base::RecordAction(UserMetricsAction("Accel_Search_LWin")); |
| 339 Shell::GetInstance()->ToggleAppList(nullptr); | 339 WmShell::Get()->ToggleAppList(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool CanHandleUnpin() { | 342 bool CanHandleUnpin() { |
| 343 wm::WindowState* window_state = wm::GetActiveWindowState(); | 343 wm::WindowState* window_state = wm::GetActiveWindowState(); |
| 344 return window_state && window_state->IsPinned(); | 344 return window_state && window_state->IsPinned(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 #if defined(OS_CHROMEOS) | 347 #if defined(OS_CHROMEOS) |
| 348 void HandleCrosh() { | 348 void HandleCrosh() { |
| 349 base::RecordAction(UserMetricsAction("Accel_Open_Crosh")); | 349 base::RecordAction(UserMetricsAction("Accel_Open_Crosh")); |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 message_center::NotifierId( | 699 message_center::NotifierId( |
| 700 message_center::NotifierId::SYSTEM_COMPONENT, | 700 message_center::NotifierId::SYSTEM_COMPONENT, |
| 701 system_notifier::kNotifierDeprecatedAccelerator), | 701 system_notifier::kNotifierDeprecatedAccelerator), |
| 702 message_center::RichNotificationData(), | 702 message_center::RichNotificationData(), |
| 703 new DeprecatedAcceleratorNotificationDelegate)); | 703 new DeprecatedAcceleratorNotificationDelegate)); |
| 704 message_center::MessageCenter::Get()->AddNotification( | 704 message_center::MessageCenter::Get()->AddNotification( |
| 705 std::move(notification)); | 705 std::move(notification)); |
| 706 } | 706 } |
| 707 | 707 |
| 708 } // namespace ash | 708 } // namespace ash |
| OLD | NEW |