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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 357063002: Snap widgets to pixel boundary on ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust tests Created 6 years, 5 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 4f5358f13db0849ed273c05e0c450d52010de2d4..e606732b496a6e2bdf8135aecbe8acefda0dad5e 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -187,7 +187,8 @@ class ShelfLayoutManager::UpdateShelfObserver
// ShelfLayoutManager ----------------------------------------------------------
ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf)
- : root_window_(shelf->GetNativeView()->GetRootWindow()),
+ : SnapToPixelLayoutManager(shelf->GetNativeView()->parent()),
+ root_window_(shelf->GetNativeView()->GetRootWindow()),
updating_bounds_(false),
auto_hide_behavior_(SHELF_AUTO_HIDE_BEHAVIOR_NEVER),
alignment_(SHELF_ALIGNMENT_BOTTOM),
@@ -515,22 +516,9 @@ void ShelfLayoutManager::OnWindowResized() {
LayoutShelf();
}
-void ShelfLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void ShelfLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) {
-}
-
void ShelfLayoutManager::SetChildBounds(aura::Window* child,
const gfx::Rect& requested_bounds) {
- SetChildBoundsDirect(child, requested_bounds);
+ SnapToPixelLayoutManager::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_ &&
« 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