| 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
|
|
|