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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 2201323004: mash: Use wm::WmSnapToPixelLayoutManager for the shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also convert the StatusAreaLayoutManager. Created 4 years, 4 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/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 512b88fa38575a97ad9ecccc7c55e693f860f42c..737785cbeaf6ba1a99d8c3ac3f0b1b155d025902 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -194,8 +194,7 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl
// ShelfLayoutManager ----------------------------------------------------------
ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget)
- : SnapToPixelLayoutManager(shelf_widget->GetNativeView()->parent()),
- root_window_(shelf_widget->GetNativeView()->GetRootWindow()),
+ : root_window_(shelf_widget->GetNativeView()->GetRootWindow()),
updating_bounds_(false),
shelf_widget_(shelf_widget),
workspace_controller_(NULL),
@@ -500,20 +499,21 @@ void ShelfLayoutManager::SetAnimationDurationOverride(
}
////////////////////////////////////////////////////////////////////////////////
-// ShelfLayoutManager, aura::LayoutManager implementation:
+// ShelfLayoutManager, wm::WmSnapToPixelLayoutManager implementation:
void ShelfLayoutManager::OnWindowResized() {
LayoutShelf();
}
-void ShelfLayoutManager::SetChildBounds(aura::Window* child,
+void ShelfLayoutManager::SetChildBounds(WmWindow* child,
const gfx::Rect& requested_bounds) {
- SnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
+ wm::WmSnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
// We may contain other widgets (such as frame maximize bubble) but they don't
// effect the layout in anyway.
if (!updating_bounds_ &&
- ((shelf_widget_->GetNativeView() == child) ||
- (shelf_widget_->status_area_widget()->GetNativeView() == child))) {
+ ((WmLookup::Get()->GetWindowForWidget(shelf_widget_) == child) ||
+ (WmLookup::Get()->GetWindowForWidget(
+ shelf_widget_->status_area_widget()) == child))) {
LayoutShelf();
}
}
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698