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

Unified Diff: chrome/browser/ui/ash/window_positioner.cc

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 years, 3 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 | « chrome/browser/ui/ash/shelf_browsertest.cc ('k') | chrome/browser/ui/ash/window_positioner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/window_positioner.cc
diff --git a/chrome/browser/ui/ash/window_positioner.cc b/chrome/browser/ui/ash/window_positioner.cc
index 0b69be955274b2053914ba28fc96ae4d7ad5c01e..e2e196871ee196b1d2cb9f6e94b6b2b271b9e6f7 100644
--- a/chrome/browser/ui/ash/window_positioner.cc
+++ b/chrome/browser/ui/ash/window_positioner.cc
@@ -17,7 +17,6 @@ namespace ash {
// statics
-// Currently matches kGridSize * 2 (defined in ash/wm/workspace_controller.cc).
const int WindowPositioner::kMinimumWindowOffset = 32;
WindowPositioner::WindowPositioner()
@@ -33,14 +32,7 @@ WindowPositioner::~WindowPositioner() {
}
gfx::Rect WindowPositioner::GetPopupPosition(const gfx::Rect& old_pos) {
- int grid = ash::Shell::GetInstance()->GetGridSize();
- // Make sure that the grid has a minimum resolution.
- if (!grid) {
- grid = kMinimumWindowOffset;
- } else {
- while (grid < kMinimumWindowOffset)
- grid *= 2;
- }
+ int grid = kMinimumWindowOffset;
popup_position_offset_from_screen_corner_x = grid;
popup_position_offset_from_screen_corner_y = grid;
if (!pop_position_offset_increment_x) {
@@ -160,10 +152,6 @@ gfx::Rect WindowPositioner::SmartPopupPosition(
if (regions[i]->Intersects(gfx::Rect(x + work_area.x(),
y + work_area.y(), w, h))) {
y = regions[i]->bottom() - work_area.y();
- if (grid > 1) {
- // Align to the (next) grid step.
- y = ash::WindowResizer::AlignToGridRoundUp(y, grid);
- }
break;
}
}
« no previous file with comments | « chrome/browser/ui/ash/shelf_browsertest.cc ('k') | chrome/browser/ui/ash/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698