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

Unified Diff: ash/shell.cc

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: safer shutdown (status_area_widget_) Created 7 years, 9 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 | « ash/shell.h ('k') | ash/shell/context_menu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ash/shell.h ('k') | ash/shell/context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698