summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-17 03:50:33 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-17 03:50:33 +0000
commit42c0a0c6d7f217aa7b52a4f3452f74857d894229 (patch)
treeac51dd0c4ee2e4cf8b3425ede7a78cb5a8da257c /ui/aura
parent0e62ba1500c67c29943d8ff3ea48d07599396e92 (diff)
downloadchromium_src-42c0a0c6d7f217aa7b52a4f3452f74857d894229.zip
chromium_src-42c0a0c6d7f217aa7b52a4f3452f74857d894229.tar.gz
chromium_src-42c0a0c6d7f217aa7b52a4f3452f74857d894229.tar.bz2
Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX.
BUG=130828 R=oshima@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10540123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/desktop/desktop_screen_win.cc8
-rw-r--r--ui/aura/desktop/desktop_screen_win.h8
-rw-r--r--ui/aura/desktop/desktop_screen_x11.cc24
-rw-r--r--ui/aura/monitor_manager.cc2
-rw-r--r--ui/aura/monitor_manager.h8
-rw-r--r--ui/aura/root_window.cc2
-rw-r--r--ui/aura/root_window_host_linux.cc2
-rw-r--r--ui/aura/single_monitor_manager.cc8
-rw-r--r--ui/aura/single_monitor_manager.h8
-rw-r--r--ui/aura/test/test_screen.cc8
-rw-r--r--ui/aura/test/test_screen.h8
-rw-r--r--ui/aura/window_unittest.cc4
12 files changed, 45 insertions, 45 deletions
diff --git a/ui/aura/desktop/desktop_screen_win.cc b/ui/aura/desktop/desktop_screen_win.cc
index 1eebb68..5738d9b 100644
--- a/ui/aura/desktop/desktop_screen_win.cc
+++ b/ui/aura/desktop/desktop_screen_win.cc
@@ -58,11 +58,11 @@ gfx::NativeWindow DesktopScreenWin::GetWindowAtCursorScreenPoint() {
return host ? host->GetRootWindow() : NULL;
}
-int DesktopScreenWin::GetNumMonitors() {
+int DesktopScreenWin::GetNumDisplays() {
return GetSystemMetrics(SM_CMONITORS);
}
-gfx::Display DesktopScreenWin::GetMonitorNearestWindow(
+gfx::Display DesktopScreenWin::GetDisplayNearestWindow(
gfx::NativeView window) const {
gfx::AcceleratedWidget accelerated_window =
window->GetRootWindow()->GetAcceleratedWidget();
@@ -74,7 +74,7 @@ gfx::Display DesktopScreenWin::GetMonitorNearestWindow(
return GetDisplay(monitor_info);
}
-gfx::Display DesktopScreenWin::GetMonitorNearestPoint(
+gfx::Display DesktopScreenWin::GetDisplayNearestPoint(
const gfx::Point& point) const {
POINT initial_loc = { point.x(), point.y() };
HMONITOR monitor = MonitorFromPoint(initial_loc, MONITOR_DEFAULTTONEAREST);
@@ -85,7 +85,7 @@ gfx::Display DesktopScreenWin::GetMonitorNearestPoint(
return gfx::Display();
}
-gfx::Display DesktopScreenWin::GetPrimaryMonitor() const {
+gfx::Display DesktopScreenWin::GetPrimaryDisplay() const {
MONITORINFO mi = GetMonitorInfoForMonitor(
MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY));
gfx::Display display = GetDisplay(mi);
diff --git a/ui/aura/desktop/desktop_screen_win.h b/ui/aura/desktop/desktop_screen_win.h
index 02c2af1..97eddb0 100644
--- a/ui/aura/desktop/desktop_screen_win.h
+++ b/ui/aura/desktop/desktop_screen_win.h
@@ -19,12 +19,12 @@ public:
// Overridden from gfx::ScreenImpl:
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
- virtual int GetNumMonitors() OVERRIDE;
- virtual gfx::Display GetMonitorNearestWindow(
+ virtual int GetNumDisplays() OVERRIDE;
+ virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView window) const OVERRIDE;
- virtual gfx::Display GetMonitorNearestPoint(
+ virtual gfx::Display GetDisplayNearestPoint(
const gfx::Point& point) const OVERRIDE;
- virtual gfx::Display GetPrimaryMonitor() const OVERRIDE;
+ virtual gfx::Display GetPrimaryDisplay() 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 97faee8..e8f2e66 100644
--- a/ui/aura/desktop/desktop_screen_x11.cc
+++ b/ui/aura/desktop/desktop_screen_x11.cc
@@ -21,7 +21,7 @@ namespace {
// TODO(erg): This method is a temporary hack, until we can reliably extract
// location data out of XRandR.
-gfx::Size GetPrimaryMonitorSize() {
+gfx::Size GetPrimaryDisplaySize() {
::Display* display = ui::GetXDisplay();
::Screen* screen = DefaultScreenOfDisplay(display);
int width = WidthOfScreen(screen);
@@ -38,12 +38,12 @@ class DesktopScreenX11 : public gfx::ScreenImpl {
// Overridden from gfx::ScreenImpl:
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
- virtual int GetNumMonitors() OVERRIDE;
- virtual gfx::Display GetMonitorNearestWindow(
+ virtual int GetNumDisplays() OVERRIDE;
+ virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView window) const OVERRIDE;
- virtual gfx::Display GetMonitorNearestPoint(
+ virtual gfx::Display GetDisplayNearestPoint(
const gfx::Point& point) const OVERRIDE;
- virtual gfx::Display GetPrimaryMonitor() const OVERRIDE;
+ virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11);
@@ -86,27 +86,27 @@ gfx::NativeWindow DesktopScreenX11::GetWindowAtCursorScreenPoint() {
return NULL;
}
-int DesktopScreenX11::GetNumMonitors() {
+int DesktopScreenX11::GetNumDisplays() {
// TODO(erg): Figure this out with oshima or piman because I have no clue
// about the XRandR implications here.
return 1;
}
-gfx::Display DesktopScreenX11::GetMonitorNearestWindow(
+gfx::Display DesktopScreenX11::GetDisplayNearestWindow(
gfx::NativeView window) const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize()));
}
-gfx::Display DesktopScreenX11::GetMonitorNearestPoint(
+gfx::Display DesktopScreenX11::GetDisplayNearestPoint(
const gfx::Point& point) const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize()));
}
-gfx::Display DesktopScreenX11::GetPrimaryMonitor() const {
+gfx::Display DesktopScreenX11::GetPrimaryDisplay() const {
// TODO(erg): Do the right thing once we know what that is.
- return gfx::Display(0, gfx::Rect(GetPrimaryMonitorSize()));
+ return gfx::Display(0, gfx::Rect(GetPrimaryDisplaySize()));
}
} // namespace
diff --git a/ui/aura/monitor_manager.cc b/ui/aura/monitor_manager.cc
index 9d12e80..aba7bcc 100644
--- a/ui/aura/monitor_manager.cc
+++ b/ui/aura/monitor_manager.cc
@@ -51,7 +51,7 @@ gfx::Display MonitorManager::CreateMonitorFromSpec(const std::string& spec) {
RootWindow* MonitorManager::CreateRootWindowForPrimaryMonitor() {
MonitorManager* manager = aura::Env::GetInstance()->monitor_manager();
RootWindow* root =
- manager->CreateRootWindowForMonitor(manager->GetMonitorAt(0));
+ manager->CreateRootWindowForMonitor(manager->GetDisplayAt(0));
if (use_fullscreen_host_window_)
root->ConfineCursorToWindow();
return root;
diff --git a/ui/aura/monitor_manager.h b/ui/aura/monitor_manager.h
index 257d3aa..40e6bbf 100644
--- a/ui/aura/monitor_manager.h
+++ b/ui/aura/monitor_manager.h
@@ -68,16 +68,16 @@ class AURA_EXPORT MonitorManager {
const gfx::Display& display) = 0;
// Returns the display at |index|. The display at 0 is considered "primary".
- virtual const gfx::Display& GetMonitorAt(size_t index) = 0;
+ virtual const gfx::Display& GetDisplayAt(size_t index) = 0;
- virtual size_t GetNumMonitors() const = 0;
+ virtual size_t GetNumDisplays() const = 0;
// Returns the display object nearest given |window|.
- virtual const gfx::Display& GetMonitorNearestWindow(
+ virtual const gfx::Display& GetDisplayNearestWindow(
const Window* window) const = 0;
// Returns the monitor object nearest given |pint|.
- virtual const gfx::Display& GetMonitorNearestPoint(
+ virtual const gfx::Display& GetDisplayNearestPoint(
const gfx::Point& point) const = 0;
protected:
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d3c99d7..864f735 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -79,7 +79,7 @@ void GetEventFiltersToNotify(Window* target, EventFilters* filters) {
float GetDeviceScaleFactorFromMonitor(const aura::Window* window) {
MonitorManager* monitor_manager = Env::GetInstance()->monitor_manager();
- return monitor_manager->GetMonitorNearestWindow(window).device_scale_factor();
+ return monitor_manager->GetDisplayNearestWindow(window).device_scale_factor();
}
Window* ConsumerToWindow(ui::GestureConsumer* consumer) {
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 419cbb81..fe64054 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -816,7 +816,7 @@ void RootWindowHostLinux::SetBounds(const gfx::Rect& bounds) {
// size, which is in DIP, changes when the scale changes.
float current_scale = root_window_->compositor()->device_scale_factor();
float new_scale =
- gfx::Screen::GetMonitorNearestWindow(root_window_).device_scale_factor();
+ gfx::Screen::GetDisplayNearestWindow(root_window_).device_scale_factor();
bool size_changed = bounds_.size() != bounds.size() ||
current_scale != new_scale;
diff --git a/ui/aura/single_monitor_manager.cc b/ui/aura/single_monitor_manager.cc
index 12c484f..e099341 100644
--- a/ui/aura/single_monitor_manager.cc
+++ b/ui/aura/single_monitor_manager.cc
@@ -54,20 +54,20 @@ RootWindow* SingleMonitorManager::CreateRootWindowForMonitor(
return root_window_;
}
-const gfx::Display& SingleMonitorManager::GetMonitorAt(size_t index) {
+const gfx::Display& SingleMonitorManager::GetDisplayAt(size_t index) {
return display_;
}
-size_t SingleMonitorManager::GetNumMonitors() const {
+size_t SingleMonitorManager::GetNumDisplays() const {
return 1;
}
-const gfx::Display& SingleMonitorManager::GetMonitorNearestWindow(
+const gfx::Display& SingleMonitorManager::GetDisplayNearestWindow(
const Window* window) const {
return display_;
}
-const gfx::Display& SingleMonitorManager::GetMonitorNearestPoint(
+const gfx::Display& SingleMonitorManager::GetDisplayNearestPoint(
const gfx::Point& point) const {
return display_;
}
diff --git a/ui/aura/single_monitor_manager.h b/ui/aura/single_monitor_manager.h
index fb92140..46ef34c 100644
--- a/ui/aura/single_monitor_manager.h
+++ b/ui/aura/single_monitor_manager.h
@@ -30,13 +30,13 @@ class AURA_EXPORT SingleMonitorManager : public MonitorManager,
const std::vector<gfx::Display>& display) OVERRIDE;
virtual RootWindow* CreateRootWindowForMonitor(
const gfx::Display& display) OVERRIDE;
- virtual const gfx::Display& GetMonitorAt(size_t index) OVERRIDE;
+ virtual const gfx::Display& GetDisplayAt(size_t index) OVERRIDE;
- virtual size_t GetNumMonitors() const OVERRIDE;
+ virtual size_t GetNumDisplays() const OVERRIDE;
- virtual const gfx::Display& GetMonitorNearestWindow(
+ virtual const gfx::Display& GetDisplayNearestWindow(
const Window* window) const OVERRIDE;
- virtual const gfx::Display& GetMonitorNearestPoint(
+ virtual const gfx::Display& GetDisplayNearestPoint(
const gfx::Point& point) const OVERRIDE;
// WindowObserver overrides:
diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc
index 7968e52..95019a4 100644
--- a/ui/aura/test/test_screen.cc
+++ b/ui/aura/test/test_screen.cc
@@ -28,20 +28,20 @@ gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPoint() {
return root_window_->GetTopWindowContainingPoint(point);
}
-int TestScreen::GetNumMonitors() {
+int TestScreen::GetNumDisplays() {
return 1;
}
-gfx::Display TestScreen::GetMonitorNearestWindow(
+gfx::Display TestScreen::GetDisplayNearestWindow(
gfx::NativeWindow window) const {
return GetMonitor();
}
-gfx::Display TestScreen::GetMonitorNearestPoint(const gfx::Point& point) const {
+gfx::Display TestScreen::GetDisplayNearestPoint(const gfx::Point& point) const {
return GetMonitor();
}
-gfx::Display TestScreen::GetPrimaryMonitor() const {
+gfx::Display TestScreen::GetPrimaryDisplay() const {
return GetMonitor();
}
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h
index 13b29b3..399b486 100644
--- a/ui/aura/test/test_screen.h
+++ b/ui/aura/test/test_screen.h
@@ -22,12 +22,12 @@ class TestScreen : public gfx::ScreenImpl {
// gfx::ScreenImpl overrides:
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
- virtual int GetNumMonitors() OVERRIDE;
- virtual gfx::Display GetMonitorNearestWindow(
+ virtual int GetNumDisplays() OVERRIDE;
+ virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView view) const OVERRIDE;
- virtual gfx::Display GetMonitorNearestPoint(
+ virtual gfx::Display GetDisplayNearestPoint(
const gfx::Point& point) const OVERRIDE;
- virtual gfx::Display GetPrimaryMonitor() const OVERRIDE;
+ virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
private:
gfx::Display GetMonitor() const;
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index f0da477..51a41f3 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -1165,7 +1165,7 @@ TEST_F(WindowTest, IgnoreEventsTest) {
TEST_F(WindowTest, Transform) {
gfx::Size size = root_window()->GetHostSize();
EXPECT_EQ(gfx::Rect(size),
- gfx::Screen::GetMonitorNearestPoint(gfx::Point()).bounds());
+ gfx::Screen::GetDisplayNearestPoint(gfx::Point()).bounds());
// Rotate it clock-wise 90 degrees.
ui::Transform transform;
@@ -1179,7 +1179,7 @@ TEST_F(WindowTest, Transform) {
root_window()->bounds().size().ToString());
EXPECT_EQ(
gfx::Rect(transformed_size).ToString(),
- gfx::Screen::GetMonitorNearestPoint(gfx::Point()).bounds().ToString());
+ gfx::Screen::GetDisplayNearestPoint(gfx::Point()).bounds().ToString());
// Host size shouldn't change.
EXPECT_EQ(size.ToString(),