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

Unified Diff: ash/root_window_controller.cc

Issue 2015043002: mash: Convert shelf to wm::WmWindow types, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unused include Created 4 years, 7 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
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index aa294834af91784bbc92d4ce44ab2754427c75c5..9bc5d4cea68b167ad9c42f585e223b4fd8dbbba0 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -436,7 +436,11 @@ void RootWindowController::ShowShelf() {
shelf_widget_->status_area_widget()->Show();
}
-void RootWindowController::OnShelfCreated() {
+void RootWindowController::CreateShelf() {
+ if (shelf_widget_->shelf())
+ return;
+ shelf_widget_->CreateShelf();
+
if (panel_layout_manager_)
panel_layout_manager_->SetShelf(shelf_widget_->shelf()->wm_shelf());
if (docked_layout_manager_) {
@@ -448,6 +452,8 @@ void RootWindowController::OnShelfCreated() {
// Notify shell observers that the shelf has been created.
Shell::GetInstance()->OnShelfCreatedForRootWindow(GetRootWindow());
+
+ shelf_widget_->PostCreateShelf();
}
void RootWindowController::UpdateAfterLoginStatusChange(
@@ -722,7 +728,7 @@ void RootWindowController::Init(RootWindowType root_window_type,
// Create a shelf if a user is already logged in.
if (shell->session_state_delegate()->NumberOfLoggedInUsers())
- shelf_widget()->CreateShelf();
+ CreateShelf();
// Notify shell observers about new root window.
shell->OnRootWindowAdded(root_window);
@@ -756,9 +762,10 @@ void RootWindowController::InitLayoutManagers() {
new AlwaysOnTopController(always_on_top_container));
DCHECK(!shelf_widget_.get());
- aura::Window* shelf_container = GetContainer(kShellWindowId_ShelfContainer);
- // TODO(harrym): Remove when status area is view.
- aura::Window* status_container = GetContainer(kShellWindowId_StatusContainer);
+ wm::WmWindow* shelf_container =
+ wm::WmWindowAura::Get(GetContainer(kShellWindowId_ShelfContainer));
+ wm::WmWindow* status_container =
+ wm::WmWindowAura::Get(GetContainer(kShellWindowId_StatusContainer));
shelf_widget_.reset(new ShelfWidget(shelf_container, status_container,
workspace_controller()));
workspace_layout_manager_delegate->set_shelf(

Powered by Google App Engine
This is Rietveld 408576698