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

Unified Diff: ash/wm/status_area_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/wm/status_area_layout_manager.h ('k') | ash/wm/system_modal_container_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/status_area_layout_manager.cc
diff --git a/ash/wm/status_area_layout_manager.cc b/ash/wm/status_area_layout_manager.cc
index a93f102f9b16e600cdfa5364ed9ea63fbfb04df3..b4e6abf0b74ca294ec979c81eef4f5c2d1f43f66 100644
--- a/ash/wm/status_area_layout_manager.cc
+++ b/ash/wm/status_area_layout_manager.cc
@@ -16,9 +16,9 @@ namespace ash {
////////////////////////////////////////////////////////////////////////////////
// StatusAreaLayoutManager, public:
-StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfWidget* shelf)
- : in_layout_(false),
- shelf_(shelf) {
+StatusAreaLayoutManager::StatusAreaLayoutManager(aura::Window* container,
+ ShelfWidget* shelf)
+ : SnapToPixelLayoutManager(container), in_layout_(false), shelf_(shelf) {
}
StatusAreaLayoutManager::~StatusAreaLayoutManager() {
@@ -31,27 +31,13 @@ void StatusAreaLayoutManager::OnWindowResized() {
LayoutStatusArea();
}
-void StatusAreaLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
-
-void StatusAreaLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child, bool visible) {
-}
-
void StatusAreaLayoutManager::SetChildBounds(
aura::Window* child,
const gfx::Rect& requested_bounds) {
// Only need to have the shelf do a layout if the child changing is the status
// area and the shelf isn't in the process of doing a layout.
if (child != shelf_->status_area_widget()->GetNativeView() || in_layout_) {
- SetChildBoundsDirect(child, requested_bounds);
+ SnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
return;
}
@@ -60,7 +46,7 @@ void StatusAreaLayoutManager::SetChildBounds(
if (requested_bounds == child->GetTargetBounds())
return;
- SetChildBoundsDirect(child, requested_bounds);
+ SnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
LayoutStatusArea();
}
« no previous file with comments | « ash/wm/status_area_layout_manager.h ('k') | ash/wm/system_modal_container_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698