| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index e44c477d42c94b9191bd8b5d8a9dc7011dd52c4e..ed7d9e41d19ba8c6c89487d7e5c7be3c6e781af7 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"
|
| @@ -706,15 +708,14 @@ void Shell::OnAppTerminating() {
|
| void Shell::OnLockStateChanged(bool locked) {
|
| FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked));
|
| }
|
| -
|
| void Shell::CreateLauncher() {
|
| if (IsLauncherPerDisplayEnabled()) {
|
| RootWindowControllerList controllers = GetAllRootWindowControllers();
|
| for (RootWindowControllerList::iterator iter = controllers.begin();
|
| - iter != controllers.end(); ++iter)
|
| - (*iter)->CreateLauncher();
|
| + iter != controllers.end(); ++iter)
|
| + (*iter)->shelf()->CreateLauncher();
|
| } else {
|
| - GetPrimaryRootWindowController()->CreateLauncher();
|
| + GetPrimaryRootWindowController()->shelf()->CreateLauncher();
|
| }
|
| }
|
|
|
| @@ -722,7 +723,7 @@ void Shell::ShowLauncher() {
|
| if (IsLauncherPerDisplayEnabled()) {
|
| RootWindowControllerList controllers = GetAllRootWindowControllers();
|
| for (RootWindowControllerList::iterator iter = controllers.begin();
|
| - iter != controllers.end(); ++iter)
|
| + iter != controllers.end(); ++iter)
|
| (*iter)->ShowLauncher();
|
| } else {
|
| GetPrimaryRootWindowController()->ShowLauncher();
|
| @@ -747,24 +748,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) {
|
| @@ -803,12 +808,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() {
|
|
|