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

Unified Diff: ash/snap_to_pixel_layout_manager.h

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_widget.cc ('k') | ash/snap_to_pixel_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/snap_to_pixel_layout_manager.h
diff --git a/athena/common/fill_layout_manager.h b/ash/snap_to_pixel_layout_manager.h
similarity index 50%
copy from athena/common/fill_layout_manager.h
copy to ash/snap_to_pixel_layout_manager.h
index a5df2d46d7a3e086359d637d8d87e6553deda58a..c3be66fad789f358f5442798fe73cd6a50e5c2f1 100644
--- a/athena/common/fill_layout_manager.h
+++ b/ash/snap_to_pixel_layout_manager.h
@@ -2,35 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ATHENA_COMMON_FILL_LAYOUT_MANAGER_H_
-#define ATHENA_COMMON_FILL_LAYOUT_MANAGER_H_
+#ifndef ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
+#define ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
-#include "athena/athena_export.h"
+#include "ash/ash_export.h"
+#include "base/macros.h"
#include "ui/aura/layout_manager.h"
-namespace athena {
+namespace ash {
-class ATHENA_EXPORT FillLayoutManager : public aura::LayoutManager {
+// A layout manager that places children's layer at the physical pixel
+// boundaries.
+class ASH_EXPORT SnapToPixelLayoutManager : public aura::LayoutManager {
public:
- explicit FillLayoutManager(aura::Window* container);
- virtual ~FillLayoutManager();
+ explicit SnapToPixelLayoutManager(aura::Window* container);
+ virtual ~SnapToPixelLayoutManager();
- // aura::LayoutManager:
+ protected:
+ // Overridden from aura::LayoutManager:
virtual void OnWindowResized() OVERRIDE;
virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
virtual void OnChildWindowVisibilityChanged(aura::Window* child,
- bool visible) OVERRIDE;
+ bool visibile) OVERRIDE;
virtual void SetChildBounds(aura::Window* child,
const gfx::Rect& requested_bounds) OVERRIDE;
private:
- aura::Window* container_;
-
- DISALLOW_COPY_AND_ASSIGN(FillLayoutManager);
+ DISALLOW_COPY_AND_ASSIGN(SnapToPixelLayoutManager);
};
-} // namespace athena
+} // namespace ash
-#endif // ATHENA_COMMON_FILL_LAYOUT_MANAGER_H_
+#endif // ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/snap_to_pixel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698