| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 77b60f9c95e1472e199282c61d252a07f5f7f98e..558870688ef44829c67e2762a6d1440395d52f89 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"
|
| @@ -721,9 +723,9 @@ void Shell::CreateLauncher() {
|
| RootWindowControllerList controllers = GetAllRootWindowControllers();
|
| for (RootWindowControllerList::iterator iter = controllers.begin();
|
| iter != controllers.end(); ++iter)
|
| - (*iter)->CreateLauncher();
|
| + (*iter)->shelf()->CreateLauncher();
|
| } else {
|
| - GetPrimaryRootWindowController()->CreateLauncher();
|
| + GetPrimaryRootWindowController()->shelf()->CreateLauncher();
|
| }
|
| }
|
|
|
| @@ -756,24 +758,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)->
|
| + GetShelfLayoutManager()->GetAlignment();
|
| }
|
|
|
| void Shell::SetDimming(bool should_dim) {
|
| @@ -812,12 +818,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();
|
| + ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf();
|
| + return shelf && shelf->status_area_widget();
|
| }
|
|
|
| SystemTray* Shell::GetPrimarySystemTray() {
|
|
|