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

Unified Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 1659283002: ash: Explicitly teach various components about ShelfLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ozone-ui-event-platform-event
Patch Set: fix-test Created 4 years, 11 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/system/web_notification/web_notification_tray.cc ('k') | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index d79bcaccadb6303f994bcb657ae3b8ad2d708236..f010910a999bf30d8ddece814b85aeec3c9a6b97 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -426,8 +426,8 @@ DockedWindowLayoutManager::~DockedWindowLayoutManager() {
void DockedWindowLayoutManager::Shutdown() {
if (shelf_ && shelf_->shelf_widget()) {
- ShelfLayoutManager* shelf_layout_manager = ShelfLayoutManager::ForShelf(
- shelf_->shelf_widget()->GetNativeWindow());
+ ShelfLayoutManager* shelf_layout_manager =
+ shelf_->shelf_widget()->shelf_layout_manager();
shelf_layout_manager->RemoveObserver(this);
shelf_observer_.reset();
}
@@ -540,8 +540,8 @@ void DockedWindowLayoutManager::SetShelf(Shelf* shelf) {
DCHECK(!shelf_);
shelf_ = shelf;
if (shelf_->shelf_widget()) {
- ShelfLayoutManager* shelf_layout_manager = ShelfLayoutManager::ForShelf(
- shelf_->shelf_widget()->GetNativeWindow());
+ ShelfLayoutManager* shelf_layout_manager =
+ shelf_->shelf_widget()->shelf_layout_manager();
shelf_layout_manager->AddObserver(this);
shelf_observer_.reset(new ShelfWindowObserver(this));
}
@@ -756,7 +756,7 @@ void DockedWindowLayoutManager::SetChildBounds(
return;
// Whenever one of our windows is moved or resized enforce layout.
ShelfLayoutManager* shelf_layout =
- ShelfLayoutManager::ForShelf(dock_container_);
+ shelf_->shelf_widget()->shelf_layout_manager();
if (shelf_layout)
shelf_layout->UpdateVisibilityState();
}
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698