| Index: ash/display/display_util.cc
|
| diff --git a/ash/display/display_util.cc b/ash/display/display_util.cc
|
| index 0fa95e6ebd9696025147bf0106efc6dbf2bb2730..afa67d2a91aa5538ad6b34201cce16c3e5179755 100644
|
| --- a/ash/display/display_util.cc
|
| +++ b/ash/display/display_util.cc
|
| @@ -13,7 +13,7 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/window_tree_host.h"
|
| -#include "ui/gfx/display.h"
|
| +#include "ui/display/display.h"
|
| #include "ui/gfx/geometry/point.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/geometry/size_conversions.h"
|
| @@ -151,7 +151,7 @@ std::vector<DisplayMode> CreateUnifiedDisplayModeList(
|
| bool GetDisplayModeForResolution(const DisplayInfo& info,
|
| const gfx::Size& resolution,
|
| DisplayMode* out) {
|
| - if (gfx::Display::IsInternalDisplayId(info.id()))
|
| + if (display::Display::IsInternalDisplayId(info.id()))
|
| return false;
|
|
|
| const std::vector<DisplayMode>& modes = info.display_modes();
|
| @@ -176,7 +176,7 @@ bool GetDisplayModeForNextUIScale(const DisplayInfo& info,
|
| DisplayMode* out) {
|
| DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| if (!display_manager->IsActiveDisplayId(info.id()) ||
|
| - !gfx::Display::IsInternalDisplayId(info.id())) {
|
| + !display::Display::IsInternalDisplayId(info.id())) {
|
| return false;
|
| }
|
| const std::vector<DisplayMode>& modes = info.display_modes();
|
| @@ -189,7 +189,7 @@ bool GetDisplayModeForNextUIScale(const DisplayInfo& info,
|
| bool GetDisplayModeForNextResolution(const DisplayInfo& info,
|
| bool up,
|
| DisplayMode* out) {
|
| - if (gfx::Display::IsInternalDisplayId(info.id()))
|
| + if (display::Display::IsInternalDisplayId(info.id()))
|
| return false;
|
| const std::vector<DisplayMode>& modes = info.display_modes();
|
| DisplayMode tmp(info.size_in_pixel(), 0.0f, false, false);
|
| @@ -206,7 +206,7 @@ bool GetDisplayModeForNextResolution(const DisplayInfo& info,
|
| bool SetDisplayUIScale(int64_t id, float ui_scale) {
|
| DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| if (!display_manager->IsActiveDisplayId(id) ||
|
| - !gfx::Display::IsInternalDisplayId(id)) {
|
| + !display::Display::IsInternalDisplayId(id)) {
|
| return false;
|
| }
|
| const DisplayInfo& info = display_manager->GetDisplayInfo(id);
|
| @@ -222,8 +222,8 @@ bool HasDisplayModeForUIScale(const DisplayInfo& info, float ui_scale) {
|
| return std::find_if(modes.begin(), modes.end(), comparator) != modes.end();
|
| }
|
|
|
| -bool ComputeBoundary(const gfx::Display& a_display,
|
| - const gfx::Display& b_display,
|
| +bool ComputeBoundary(const display::Display& a_display,
|
| + const display::Display& b_display,
|
| gfx::Rect* a_edge_in_screen,
|
| gfx::Rect* b_edge_in_screen) {
|
| const gfx::Rect& a_bounds = a_display.bounds();
|
| @@ -365,10 +365,11 @@ void MoveCursorTo(AshWindowTreeHost* ash_host,
|
| }
|
| }
|
|
|
| -int FindDisplayIndexContainingPoint(const std::vector<gfx::Display>& displays,
|
| - const gfx::Point& point_in_screen) {
|
| +int FindDisplayIndexContainingPoint(
|
| + const std::vector<display::Display>& displays,
|
| + const gfx::Point& point_in_screen) {
|
| auto iter = std::find_if(displays.begin(), displays.end(),
|
| - [point_in_screen](const gfx::Display& display) {
|
| + [point_in_screen](const display::Display& display) {
|
| return display.bounds().Contains(point_in_screen);
|
| });
|
| return iter == displays.end() ? -1 : (iter - displays.begin());
|
| @@ -377,7 +378,7 @@ int FindDisplayIndexContainingPoint(const std::vector<gfx::Display>& displays,
|
| display::DisplayIdList CreateDisplayIdList(const display::DisplayList& list) {
|
| return GenerateDisplayIdList(
|
| list.begin(), list.end(),
|
| - [](const gfx::Display& display) { return display.id(); });
|
| + [](const display::Display& display) { return display.id(); });
|
| }
|
|
|
| void SortDisplayIdList(display::DisplayIdList* ids) {
|
| @@ -402,8 +403,8 @@ bool CompareDisplayIds(int64_t id1, int64_t id2) {
|
| int index_1 = id1 & 0xFF;
|
| int index_2 = id2 & 0xFF;
|
| DCHECK_NE(index_1, index_2) << id1 << " and " << id2;
|
| - return gfx::Display::IsInternalDisplayId(id1) ||
|
| - (index_1 < index_2 && !gfx::Display::IsInternalDisplayId(id2));
|
| + return display::Display::IsInternalDisplayId(id1) ||
|
| + (index_1 < index_2 && !display::Display::IsInternalDisplayId(id2));
|
| }
|
|
|
| } // namespace ash
|
|
|