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

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

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable tests that doesn't run on bots Created 8 years, 7 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 | « build/common.gypi ('k') | chrome/browser/ui/window_snapshot/window_snapshot_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/window_positioner.cc
diff --git a/chrome/browser/ui/views/ash/window_positioner.cc b/chrome/browser/ui/views/ash/window_positioner.cc
index ad6c4c618a5c1c664537e5b6da22de1dfd3a51ef..f84dfe3b000217e00a2e86dfbdad4f906d3d019c 100644
--- a/chrome/browser/ui/views/ash/window_positioner.cc
+++ b/chrome/browser/ui/views/ash/window_positioner.cc
@@ -103,7 +103,7 @@ gfx::Rect WindowPositioner::SmartPopupPosition(
const std::vector<aura::Window*> windows =
ash::WindowCycleController::BuildWindowList();
- std::vector<gfx::Rect> regions;
+ std::vector<const gfx::Rect*> regions;
// Process the window list and check if we can bail immediately.
for (size_t i = 0; i < windows.size(); i++) {
// We only include opaque and visible windows.
@@ -115,7 +115,7 @@ gfx::Rect WindowPositioner::SmartPopupPosition(
ash::wm::IsWindowFullscreen(windows[i]))
return gfx::Rect(0, 0, 0, 0);
if (ash::wm::IsWindowNormal(windows[i]))
- regions.push_back(windows[i]->bounds());
+ regions.push_back(&windows[i]->bounds());
}
}
@@ -150,9 +150,9 @@ gfx::Rect WindowPositioner::SmartPopupPosition(
while (y + h <= work_area.height()) {
size_t i;
for (i = 0; i < regions.size(); i++) {
- if (regions[i].Intersects(gfx::Rect(x + work_area.x(),
+ if (regions[i]->Intersects(gfx::Rect(x + work_area.x(),
y + work_area.y(), w, h))) {
- y = regions[i].bottom() - work_area.y();
+ y = regions[i]->bottom() - work_area.y();
if (grid > 1) {
// Align to the (next) grid step.
y = ash::WindowResizer::AlignToGridRoundUp(y, grid);
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/ui/window_snapshot/window_snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698