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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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/exit_warning_handler.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 (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 <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_commands.h" 9 #include "ash/accelerators/accelerator_commands.h"
10 #include "ash/accelerators/accelerator_controller_delegate.h" 10 #include "ash/accelerators/accelerator_controller_delegate.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 WebNotificationTray* notification_tray = 347 WebNotificationTray* notification_tray =
348 status_area_widget->web_notification_tray(); 348 status_area_widget->web_notification_tray();
349 if (notification_tray->visible()) 349 if (notification_tray->visible())
350 notification_tray->ShowMessageCenterBubble(); 350 notification_tray->ShowMessageCenterBubble();
351 } 351 }
352 } 352 }
353 353
354 void HandleShowSystemTrayBubble() { 354 void HandleShowSystemTrayBubble() {
355 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); 355 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble"));
356 aura::Window* target_root = Shell::GetRootWindowForNewWindows(); 356 aura::Window* target_root = Shell::GetRootWindowForNewWindows();
357 SystemTray* tray = GetRootWindowController(target_root)->GetSystemTray(); 357 SystemTray* tray =
358 RootWindowController::ForWindow(target_root)->GetSystemTray();
358 if (!tray->HasSystemBubble()) { 359 if (!tray->HasSystemBubble()) {
359 tray->ShowDefaultView(BUBBLE_CREATE_NEW); 360 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
360 tray->ActivateBubble(); 361 tray->ActivateBubble();
361 } 362 }
362 } 363 }
363 364
364 void HandleShowTaskManager() { 365 void HandleShowTaskManager() {
365 base::RecordAction(UserMetricsAction("Accel_Show_Task_Manager")); 366 base::RecordAction(UserMetricsAction("Accel_Show_Task_Manager"));
366 Shell::Get()->new_window_controller()->ShowTaskManager(); 367 Shell::Get()->new_window_controller()->ShowTaskManager();
367 } 368 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return Shell::Get()->session_controller()->CanLockScreen(); 520 return Shell::Get()->session_controller()->CanLockScreen();
520 } 521 }
521 522
522 void HandleLock() { 523 void HandleLock() {
523 base::RecordAction(UserMetricsAction("Accel_LockScreen_L")); 524 base::RecordAction(UserMetricsAction("Accel_LockScreen_L"));
524 Shell::Get()->session_controller()->LockScreen(); 525 Shell::Get()->session_controller()->LockScreen();
525 } 526 }
526 527
527 void HandleShowStylusTools() { 528 void HandleShowStylusTools() {
528 base::RecordAction(UserMetricsAction("Accel_Show_Stylus_Tools")); 529 base::RecordAction(UserMetricsAction("Accel_Show_Stylus_Tools"));
529 GetRootWindowController(Shell::GetRootWindowForNewWindows()) 530 Shelf::ForWindow(Shell::GetRootWindowForNewWindows())
530 ->shelf()
531 ->GetStatusAreaWidget() 531 ->GetStatusAreaWidget()
532 ->palette_tray() 532 ->palette_tray()
533 ->ShowPalette(); 533 ->ShowPalette();
534 } 534 }
535 535
536 bool CanHandleShowStylusTools() { 536 bool CanHandleShowStylusTools() {
537 return palette_utils::ShouldShowPalette(); 537 return palette_utils::ShouldShowPalette();
538 } 538 }
539 539
540 bool CanHandleStartVoiceInteraction() { 540 bool CanHandleStartVoiceInteraction() {
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 data->uma_histogram_name, data->notification_message_id, 1332 data->uma_histogram_name, data->notification_message_id,
1333 data->old_shortcut_id, data->new_shortcut_id); 1333 data->old_shortcut_id, data->new_shortcut_id);
1334 1334
1335 if (!data->deprecated_enabled) 1335 if (!data->deprecated_enabled)
1336 return AcceleratorProcessingStatus::STOP; 1336 return AcceleratorProcessingStatus::STOP;
1337 1337
1338 return AcceleratorProcessingStatus::PROCEED; 1338 return AcceleratorProcessingStatus::PROCEED;
1339 } 1339 }
1340 1340
1341 } // namespace ash 1341 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/exit_warning_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698