Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index ffa015abffb370e6fe45248b19caa43f4abd952b..3c72b9363cf8b5948370e114067900f8f0758d7d 100644 |
| --- a/ash/shell.cc |
| +++ b/ash/shell.cc |
| @@ -28,6 +28,8 @@ |
| #include "ash/magnifier/partial_magnification_controller.h" |
| #include "ash/root_window_controller.h" |
| #include "ash/screen_ash.h" |
| +#include "ash/shelf/shelf_layout_manager.h" |
| +#include "ash/shelf/shelf_widget.h" |
| #include "ash/shell_delegate.h" |
| #include "ash/shell_factory.h" |
| #include "ash/shell_window_ids.h" |
| @@ -710,15 +712,14 @@ void Shell::OnAppTerminating() { |
| void Shell::OnLockStateChanged(bool locked) { |
| FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked)); |
| } |
|
Mr4D (OOO till 08-26)
2013/03/02 02:02:12
newline
Harry McCleave
2013/03/04 02:47:41
Done.
|
| - |
| void Shell::CreateLauncher() { |
| if (IsLauncherPerDisplayEnabled()) { |
| RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| for (RootWindowControllerList::iterator iter = controllers.begin(); |
| - iter != controllers.end(); ++iter) |
| - (*iter)->CreateLauncher(); |
| + iter != controllers.end(); ++iter) |
|
Mr4D (OOO till 08-26)
2013/03/02 02:02:12
one space
Harry McCleave
2013/03/04 02:47:41
Done.
|
| + (*iter)->shelf()->CreateLauncher(); |
| } else { |
| - GetPrimaryRootWindowController()->CreateLauncher(); |
| + GetPrimaryRootWindowController()->shelf()->CreateLauncher(); |
| } |
| } |
| @@ -726,7 +727,7 @@ void Shell::ShowLauncher() { |
| if (IsLauncherPerDisplayEnabled()) { |
| RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| for (RootWindowControllerList::iterator iter = controllers.begin(); |
| - iter != controllers.end(); ++iter) |
| + iter != controllers.end(); ++iter) |
|
Mr4D (OOO till 08-26)
2013/03/02 02:02:12
one space
Harry McCleave
2013/03/04 02:47:41
Done.
|
| (*iter)->ShowLauncher(); |
| } else { |
| GetPrimaryRootWindowController()->ShowLauncher(); |
| @@ -751,24 +752,28 @@ void Shell::UpdateShelfVisibility() { |
| void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| aura::RootWindow* root_window) { |
| - GetRootWindowController(root_window)->SetShelfAutoHideBehavior(behavior); |
| + ash::internal::ShelfLayoutManager::ForLauncher(root_window)-> |
| + SetAutoHideBehavior(behavior); |
| } |
| ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( |
| aura::RootWindow* root_window) const { |
| - return GetRootWindowController(root_window)->GetShelfAutoHideBehavior(); |
| + return ash::internal::ShelfLayoutManager::ForLauncher(root_window)-> |
| + auto_hide_behavior(); |
| } |
| void Shell::SetShelfAlignment(ShelfAlignment alignment, |
| aura::RootWindow* root_window) { |
| - if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) { |
| + if (ash::internal::ShelfLayoutManager::ForLauncher(root_window)-> |
| + SetAlignment(alignment)) { |
| FOR_EACH_OBSERVER( |
| ShellObserver, observers_, OnShelfAlignmentChanged(root_window)); |
| } |
| } |
| ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { |
| - return GetRootWindowController(root_window)->GetShelfAlignment(); |
| + return GetRootWindowController(root_window)-> |
| + shelf_layout_manager()->GetAlignment(); |
| } |
| void Shell::SetDimming(bool should_dim) { |
| @@ -807,12 +812,13 @@ void Shell::OnModalWindowRemoved(aura::Window* removed) { |
| } |
| WebNotificationTray* Shell::GetWebNotificationTray() { |
| - return GetPrimaryRootWindowController()->status_area_widget()-> |
| - web_notification_tray(); |
| + return GetPrimaryRootWindowController()->shelf()-> |
| + status_area_widget()->web_notification_tray(); |
| } |
| bool Shell::HasPrimaryStatusArea() { |
| - return !!GetPrimaryRootWindowController()->status_area_widget(); |
| + return !!GetPrimaryRootWindowController()-> |
| + shelf()->status_area_widget(); |
| } |
| SystemTray* Shell::GetPrimarySystemTray() { |