summaryrefslogtreecommitdiffstats
path: root/ash/root_window_controller.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:42:47 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:42:47 +0000
commit80549c15ef5f28bd944dc3fbb1a4089f10146b6f (patch)
tree147c0249fdb9e9d67ea154a02522f029af0c8b2d /ash/root_window_controller.cc
parent8244643a07d2d7ffa082d02b22a80d09a621bf65 (diff)
downloadchromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.zip
chromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.tar.gz
chromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.tar.bz2
Cleanup: move AlwaysOnTopController to RootWindowController
remove if (shelf_) as it should always be there. BUG=253991 Review URL: https://chromiumcodereview.appspot.com/18323011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r--ash/root_window_controller.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index b765fff..b9d13ab 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -23,6 +23,8 @@
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/touch/touch_hud_debug.h"
#include "ash/touch/touch_hud_projection.h"
+#include "ash/touch/touch_observer_hud.h"
+#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/base_layout_manager.h"
#include "ash/wm/boot_splash_screen.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
@@ -263,6 +265,8 @@ void RootWindowController::InitLayoutManagers() {
always_on_top_container->SetLayoutManager(
new BaseLayoutManager(
always_on_top_container->GetRootWindow()));
+ always_on_top_controller_.reset(new internal::AlwaysOnTopController);
+ always_on_top_controller_->SetAlwaysOnTopContainer(always_on_top_container);
}
void RootWindowController::InitForPrimaryDisplay() {
@@ -337,22 +341,19 @@ void RootWindowController::OnLauncherCreated() {
}
void RootWindowController::ShowLauncher() {
- if (!shelf_.get() || !shelf_->launcher())
+ if (!shelf_->launcher())
return;
shelf_->launcher()->SetVisible(true);
shelf_->status_area_widget()->Show();
}
void RootWindowController::OnLoginStateChanged(user::LoginStatus status) {
- // TODO(oshima): remove if when launcher per display is enabled by
- // default.
- if (shelf_)
- shelf_->shelf_layout_manager()->UpdateVisibilityState();
+ shelf_->shelf_layout_manager()->UpdateVisibilityState();
}
void RootWindowController::UpdateAfterLoginStatusChange(
user::LoginStatus status) {
- if (shelf_.get() && shelf_->status_area_widget())
+ if (shelf_->status_area_widget())
shelf_->status_area_widget()->UpdateAfterLoginStatusChange(status);
}
@@ -373,6 +374,8 @@ void RootWindowController::HandleDesktopBackgroundVisible() {
}
void RootWindowController::CloseChildWindows() {
+ if (!shelf_.get())
+ return;
// panel_layout_manager_ needs to be shut down before windows are destroyed.
if (panel_layout_manager_) {
panel_layout_manager_->Shutdown();
@@ -380,10 +383,9 @@ void RootWindowController::CloseChildWindows() {
}
// TODO(harrym): Remove when Status Area Widget is a child view.
- if (shelf_)
- shelf_->ShutdownStatusAreaWidget();
+ shelf_->ShutdownStatusAreaWidget();
- if (shelf_.get() && shelf_->shelf_layout_manager())
+ if (shelf_->shelf_layout_manager())
shelf_->shelf_layout_manager()->set_workspace_controller(NULL);
// Close background widget first as it depends on tooltip.
@@ -423,13 +425,13 @@ void RootWindowController::DisableTouchHudProjection() {
}
ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() {
- return shelf_.get() ? shelf_->shelf_layout_manager() : NULL;
+ return shelf_->shelf_layout_manager();
}
SystemTray* RootWindowController::GetSystemTray() {
// We assume in throughout the code that this will not return NULL. If code
// triggers this for valid reasons, it should test status_area_widget first.
- CHECK(shelf_.get() && shelf_->status_area_widget());
+ CHECK(shelf_->status_area_widget());
return shelf_->status_area_widget()->system_tray();
}