| Index: ui/gfx/screen_mac.mm
|
| diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
|
| index a7957c2607be76d9aad82e9ce56c00e598a68614..6986b400295f6d4ae9e261b7fbd5e39c880e2e5a 100644
|
| --- a/ui/gfx/screen_mac.mm
|
| +++ b/ui/gfx/screen_mac.mm
|
| @@ -12,7 +12,7 @@
|
| @end
|
|
|
| #include "base/logging.h"
|
| -#include "ui/gfx/monitor.h"
|
| +#include "ui/gfx/display.h"
|
|
|
| namespace {
|
|
|
| @@ -45,10 +45,10 @@ NSScreen* GetMatchingScreen(const gfx::Rect& match_rect) {
|
| return max_screen;
|
| }
|
|
|
| -gfx::Monitor GetMonitorForScreen(NSScreen* screen, bool is_primary) {
|
| +gfx::Display GetDisplayForScreen(NSScreen* screen, bool is_primary) {
|
| NSRect frame = [screen frame];
|
| // TODO(oshima): Implement ID and Observer.
|
| - gfx::Monitor monitor(0, gfx::Rect(NSRectToCGRect(frame)));
|
| + gfx::Display display(0, gfx::Rect(NSRectToCGRect(frame)));
|
|
|
| NSRect visible_frame = [screen visibleFrame];
|
|
|
| @@ -57,17 +57,17 @@ gfx::Monitor GetMonitorForScreen(NSScreen* screen, bool is_primary) {
|
| gfx::Rect work_area = gfx::Rect(NSRectToCGRect(visible_frame));
|
| work_area.set_y(frame.size.height - visible_frame.origin.y -
|
| visible_frame.size.height);
|
| - monitor.set_work_area(work_area);
|
| + display.set_work_area(work_area);
|
| } else {
|
| - monitor.set_work_area(ConvertCoordinateSystem(visible_frame));
|
| + display.set_work_area(ConvertCoordinateSystem(visible_frame));
|
| }
|
| CGFloat scale;
|
| if ([screen respondsToSelector:@selector(backingScaleFactor)])
|
| scale = [screen backingScaleFactor];
|
| else
|
| scale = [screen userSpaceScaleFactor];
|
| - monitor.set_device_scale_factor(scale);
|
| - return monitor;
|
| + display.set_device_scale_factor(scale);
|
| + return display;
|
| }
|
|
|
| } // namespace
|
| @@ -89,27 +89,27 @@ gfx::Point Screen::GetCursorScreenPoint() {
|
| }
|
|
|
| // static
|
| -gfx::Monitor Screen::GetMonitorNearestWindow(gfx::NativeView view) {
|
| +gfx::Display Screen::GetMonitorNearestWindow(gfx::NativeView view) {
|
| NSWindow* window = [view window];
|
| if (!window)
|
| return GetPrimaryMonitor();
|
| NSScreen* match_screen = [window screen];
|
| - return GetMonitorForScreen(match_screen, false /* may not be primary */);
|
| + return GetDisplayForScreen(match_screen, false /* may not be primary */);
|
| }
|
|
|
| // static
|
| -gfx::Monitor Screen::GetPrimaryMonitor() {
|
| - // Primary monitor is defined as the monitor with the menubar,
|
| +gfx::Display Screen::GetPrimaryMonitor() {
|
| + // Primary display is defined as the display with the menubar,
|
| // which is always at index 0.
|
| NSScreen* primary = [[NSScreen screens] objectAtIndex:0];
|
| - gfx::Monitor monitor = GetMonitorForScreen(primary, true /* primary */);
|
| - return monitor;
|
| + gfx::Display display = GetDisplayForScreen(primary, true /* primary */);
|
| + return display;
|
| }
|
|
|
| // static
|
| -gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) {
|
| +gfx::Display Screen::GetMonitorMatching(const gfx::Rect& match_rect) {
|
| NSScreen* match_screen = GetMatchingScreen(match_rect);
|
| - return GetMonitorForScreen(match_screen, false /* may not be primary */);
|
| + return GetDisplayForScreen(match_screen, false /* may not be primary */);
|
| }
|
|
|
| // static
|
|
|