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

Unified Diff: ui/display/display_finder.cc

Issue 1945903002: Move display_finder to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
Index: ui/display/display_finder.cc
diff --git a/ui/gfx/display_finder.cc b/ui/display/display_finder.cc
similarity index 83%
rename from ui/gfx/display_finder.cc
rename to ui/display/display_finder.cc
index af27f1b3247ff687032e7814dad5817fb5b00bd2..cc352409c1485077a4be80b7981e05af2b376fe7 100644
--- a/ui/gfx/display_finder.cc
+++ b/ui/display/display_finder.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/display_finder.h"
+#include "ui/display/display_finder.h"
#include <limits>
@@ -11,10 +11,10 @@
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
-namespace gfx {
+namespace display {
const Display* FindDisplayNearestPoint(const std::vector<Display>& displays,
- const Point& point) {
+ const gfx::Point& point) {
DCHECK(!displays.empty());
int min_distance = std::numeric_limits<int>::max();
const Display* nearest_display = nullptr;
@@ -32,12 +32,12 @@ const Display* FindDisplayNearestPoint(const std::vector<Display>& displays,
const Display* FindDisplayWithBiggestIntersection(
const std::vector<Display>& displays,
- const Rect& rect) {
+ const gfx::Rect& rect) {
DCHECK(!displays.empty());
int max_area = 0;
const Display* matching = nullptr;
for (const auto& display : displays) {
- const Rect intersect = IntersectRects(display.bounds(), rect);
+ const gfx::Rect intersect = IntersectRects(display.bounds(), rect);
const int area = intersect.width() * intersect.height();
if (area > max_area) {
max_area = area;
@@ -47,4 +47,4 @@ const Display* FindDisplayWithBiggestIntersection(
return matching;
}
-} // namespace gfx
+} // namespace display
« ui/display/display_finder.h ('K') | « ui/display/display_finder.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698