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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/dip_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index f4e8f26ae5a9da0d4fc6354c25669b919735931d..08232a2b926cb0f40c3c27c27848d33d8b65214d 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -88,7 +88,7 @@ bool HandleCycleWindowMRU(WindowCycleController::Direction direction,
}
void HandleCycleWindowLinear(CycleDirection direction) {
- Shell::GetInstance()->launcher()->CycleWindowLinear(direction);
+ Launcher::ForPrimaryDisplay()->CycleWindowLinear(direction);
}
#if defined(OS_CHROMEOS)
@@ -602,8 +602,8 @@ bool AcceleratorController::PerformAction(int action,
HandleVolumeUp(accelerator);
break;
case FOCUS_LAUNCHER:
- if (shell->launcher())
- return shell->focus_cycler()->FocusWidget(shell->launcher()->widget());
+ return shell->focus_cycler()->FocusWidget(
+ Launcher::ForPrimaryDisplay()->widget());
break;
case FOCUS_NEXT_PANE:
return HandleRotatePaneFocus(Shell::FORWARD);
@@ -851,10 +851,9 @@ bool AcceleratorController::AcceleratorPressed(
}
void AcceleratorController::SwitchToWindow(int window) {
- const LauncherItems& items =
- Shell::GetInstance()->launcher()->model()->items();
- int item_count =
- Shell::GetInstance()->launcher()->model()->item_count();
+ Launcher* launcher = Launcher::ForPrimaryDisplay();
+ const LauncherItems& items = launcher->model()->items();
+ int item_count = launcher->model()->item_count();
int indexes_left = window >= 0 ? window : item_count;
int found_index = -1;
@@ -875,7 +874,7 @@ void AcceleratorController::SwitchToWindow(int window) {
(items[found_index].status == ash::STATUS_RUNNING ||
items[found_index].status == ash::STATUS_CLOSED)) {
// Then set this one as active.
- Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index);
+ launcher->ActivateLauncherItem(found_index);
}
}
« no previous file with comments | « no previous file | ash/dip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698