summaryrefslogtreecommitdiffstats
path: root/ui/aura/desktop
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 14:43:01 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 14:43:01 +0000
commit7da9c4cf0e9f949dd1f2a3322118344c5d7369c7 (patch)
treeec91a8b4f8a211bc557a9bb28b61c17f90749d02 /ui/aura/desktop
parentc5ba8a93317a8363bcaf4b17cab96a296782803c (diff)
downloadchromium_src-7da9c4cf0e9f949dd1f2a3322118344c5d7369c7.zip
chromium_src-7da9c4cf0e9f949dd1f2a3322118344c5d7369c7.tar.gz
chromium_src-7da9c4cf0e9f949dd1f2a3322118344c5d7369c7.tar.bz2
Rename gfx::Monitor to gfx::Display
BUG=130828 R=oshima@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10540091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/desktop')
-rw-r--r--ui/aura/desktop/desktop_screen_win.cc30
-rw-r--r--ui/aura/desktop/desktop_screen_win.h6
-rw-r--r--ui/aura/desktop/desktop_screen_x11.cc20
3 files changed, 28 insertions, 28 deletions
diff --git a/ui/aura/desktop/desktop_screen_win.cc b/ui/aura/desktop/desktop_screen_win.cc
index fdf1f8f..1eebb68 100644
--- a/ui/aura/desktop/desktop_screen_win.cc
+++ b/ui/aura/desktop/desktop_screen_win.cc
@@ -8,7 +8,7 @@
#include "ui/aura/desktop/desktop_screen.h"
#include "ui/aura/root_window.h"
#include "ui/aura/root_window_host.h"
-#include "ui/gfx/monitor.h"
+#include "ui/gfx/display.h"
namespace {
@@ -19,11 +19,11 @@ MONITORINFO GetMonitorInfoForMonitor(HMONITOR monitor) {
return monitor_info;
}
-gfx::Monitor GetMonitor(MONITORINFO& monitor_info) {
+gfx::Display GetDisplay(MONITORINFO& monitor_info) {
// TODO(oshima): Implement ID and Observer.
- gfx::Monitor monitor(0, gfx::Rect(monitor_info.rcMonitor));
- monitor.set_work_area(gfx::Rect(monitor_info.rcWork));
- return monitor;
+ gfx::Display display(0, gfx::Rect(monitor_info.rcMonitor));
+ display.set_work_area(gfx::Rect(monitor_info.rcWork));
+ return display;
}
} // namespace
@@ -62,7 +62,7 @@ int DesktopScreenWin::GetNumMonitors() {
return GetSystemMetrics(SM_CMONITORS);
}
-gfx::Monitor DesktopScreenWin::GetMonitorNearestWindow(
+gfx::Display DesktopScreenWin::GetMonitorNearestWindow(
gfx::NativeView window) const {
gfx::AcceleratedWidget accelerated_window =
window->GetRootWindow()->GetAcceleratedWidget();
@@ -71,27 +71,27 @@ gfx::Monitor DesktopScreenWin::GetMonitorNearestWindow(
GetMonitorInfo(MonitorFromWindow(accelerated_window,
MONITOR_DEFAULTTONEAREST),
&monitor_info);
- return GetMonitor(monitor_info);
+ return GetDisplay(monitor_info);
}
-gfx::Monitor DesktopScreenWin::GetMonitorNearestPoint(
+gfx::Display DesktopScreenWin::GetMonitorNearestPoint(
const gfx::Point& point) const {
POINT initial_loc = { point.x(), point.y() };
HMONITOR monitor = MonitorFromPoint(initial_loc, MONITOR_DEFAULTTONEAREST);
MONITORINFO mi = {0};
mi.cbSize = sizeof(mi);
if (monitor && GetMonitorInfo(monitor, &mi))
- return GetMonitor(mi);
- return gfx::Monitor();
+ return GetDisplay(mi);
+ return gfx::Display();
}
-gfx::Monitor DesktopScreenWin::GetPrimaryMonitor() const {
+gfx::Display DesktopScreenWin::GetPrimaryMonitor() const {
MONITORINFO mi = GetMonitorInfoForMonitor(
MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY));
- gfx::Monitor monitor = GetMonitor(mi);
- DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), monitor.size().width());
- DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), monitor.size().height());
- return monitor;
+ gfx::Display display = GetDisplay(mi);
+ DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width());
+ DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height());
+ return display;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/ui/aura/desktop/desktop_screen_win.h b/ui/aura/desktop/desktop_screen_win.h
index da0b1f9..02c2af1 100644
--- a/ui/aura/desktop/desktop_screen_win.h
+++ b/ui/aura/desktop/desktop_screen_win.h
@@ -20,11 +20,11 @@ public:
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
virtual int GetNumMonitors() OVERRIDE;
- virtual gfx::Monitor GetMonitorNearestWindow(
+ virtual gfx::Display GetMonitorNearestWindow(
gfx::NativeView window) const OVERRIDE;
- virtual gfx::Monitor GetMonitorNearestPoint(
+ virtual gfx::Display GetMonitorNearestPoint(
const gfx::Point& point) const OVERRIDE;
- virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE;
+ virtual gfx::Display GetPrimaryMonitor() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopScreenWin);
diff --git a/ui/aura/desktop/desktop_screen_x11.cc b/ui/aura/desktop/desktop_screen_x11.cc
index 59b6f19..97faee8 100644
--- a/ui/aura/desktop/desktop_screen_x11.cc
+++ b/ui/aura/desktop/desktop_screen_x11.cc
@@ -13,7 +13,7 @@
#include "ui/aura/root_window.h"
#include "ui/aura/root_window_host.h"
#include "ui/base/x/x11_util.h"
-#include "ui/gfx/monitor.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/screen_impl.h"
@@ -39,11 +39,11 @@ class DesktopScreenX11 : public gfx::ScreenImpl {
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
virtual int GetNumMonitors() OVERRIDE;
- virtual gfx::Monitor GetMonitorNearestWindow(
+ virtual gfx::Display GetMonitorNearestWindow(
gfx::NativeView window) const OVERRIDE;
- virtual gfx::Monitor GetMonitorNearestPoint(
+ virtual gfx::Display GetMonitorNearestPoint(
const gfx::Point& point) const OVERRIDE;
- virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE;
+ virtual gfx::Display GetPrimaryMonitor() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11);
@@ -92,21 +92,21 @@ int DesktopScreenX11::GetNumMonitors() {
return 1;
}
-gfx::Monitor DesktopScreenX11::GetMonitorNearestWindow(
+gfx::Display DesktopScreenX11::GetMonitorNearestWindow(
gfx::NativeView window) const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Monitor(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
}
-gfx::Monitor DesktopScreenX11::GetMonitorNearestPoint(
+gfx::Display DesktopScreenX11::GetMonitorNearestPoint(
const gfx::Point& point) const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Monitor(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
}
-gfx::Monitor DesktopScreenX11::GetPrimaryMonitor() const {
+gfx::Display DesktopScreenX11::GetPrimaryMonitor() const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Monitor(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
}
} // namespace