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

Unified Diff: mash/wm/root_window_controller.cc

Issue 2010473003: Wires up shelf to panel and dock layoutmanagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment 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
« no previous file with comments | « mash/wm/root_window_controller.h ('k') | mash/wm/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/root_window_controller.cc
diff --git a/mash/wm/root_window_controller.cc b/mash/wm/root_window_controller.cc
index a7c040b08cd17c0d14687263f2402e9053fd2fc2..6fdca0ebd1afd778f0f472024b9e27bad0a81d77 100644
--- a/mash/wm/root_window_controller.cc
+++ b/mash/wm/root_window_controller.cc
@@ -219,6 +219,19 @@ void RootWindowController::OnWindowDestroyed(mus::Window* window) {
root_ = nullptr;
}
+void RootWindowController::OnShelfWindowAvailable() {
+ ash::DockedWindowLayoutManager::Get(WmWindowMus::Get(root_))
+ ->SetShelf(wm_shelf_.get());
+
+ ash::PanelLayoutManager::Get(WmWindowMus::Get(root_))
+ ->SetShelf(wm_shelf_.get());
+
+ // TODO: http://crbug.com/614182 Ash's ShelfLayoutManager implements
+ // DockedWindowLayoutManagerObserver so that it can inset by the docked
+ // windows.
+ // docked_layout_manager_->AddObserver(shelf_->shelf_layout_manager());
+}
+
void RootWindowController::CreateContainer(
mash::wm::mojom::Container container,
mash::wm::mojom::Container parent_container) {
@@ -293,7 +306,8 @@ void RootWindowController::CreateContainers() {
mus::Window* user_shelf =
GetWindowForContainer(mojom::Container::USER_PRIVATE_SHELF);
- ShelfLayoutManager* shelf_layout_manager = new ShelfLayoutManager(user_shelf);
+ ShelfLayoutManager* shelf_layout_manager =
+ new ShelfLayoutManager(user_shelf, this);
layout_managers_[user_shelf].reset(shelf_layout_manager);
wm_shelf_.reset(new WmShelfMus(shelf_layout_manager));
« no previous file with comments | « mash/wm/root_window_controller.h ('k') | mash/wm/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698