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

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

Issue 2169533002: mash: Migrate shelf app list button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698