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

Side by Side Diff: chrome/browser/ui/app_list/app_list_positioner.cc

Issue 392013005: [#1] Delete reduntdant 19 header files in ui/gfx (8 of 19 by this) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted includes 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/app_list_positioner.h" 5 #include "chrome/browser/ui/app_list/app_list_positioner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/geometry/point.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
12 12
13 AppListPositioner::AppListPositioner(const gfx::Display& display, 13 AppListPositioner::AppListPositioner(const gfx::Display& display,
14 const gfx::Size& window_size, 14 const gfx::Size& window_size,
15 int min_distance_from_edge) 15 int min_distance_from_edge)
16 : display_(display), 16 : display_(display),
17 window_size_(window_size), 17 window_size_(window_size),
18 min_distance_from_edge_(min_distance_from_edge) {} 18 min_distance_from_edge_(min_distance_from_edge) {}
19 19
20 void AppListPositioner::WorkAreaSubtract(const gfx::Rect& rect) { 20 void AppListPositioner::WorkAreaSubtract(const gfx::Rect& rect) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 // Anchor the center of the window in a region that prevents the window 196 // Anchor the center of the window in a region that prevents the window
197 // showing outside of the work area. 197 // showing outside of the work area.
198 bounds_rect.Inset(window_size_.width() / 2 + min_distance_from_edge_, 198 bounds_rect.Inset(window_size_.width() / 2 + min_distance_from_edge_,
199 window_size_.height() / 2 + min_distance_from_edge_); 199 window_size_.height() / 2 + min_distance_from_edge_);
200 200
201 anchor.SetToMax(bounds_rect.origin()); 201 anchor.SetToMax(bounds_rect.origin());
202 anchor.SetToMin(bounds_rect.bottom_right()); 202 anchor.SetToMin(bounds_rect.bottom_right());
203 return anchor; 203 return anchor;
204 } 204 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698