diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 17:26:19 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 17:26:19 +0000 |
commit | f1ddc1da13daa47d4513ead413cd167faadd4c71 (patch) | |
tree | 15b5e919b8b43a92f38adbf6ba2bdd296327a3ef /ui/gfx/screen_win.cc | |
parent | 7e2d6e1cdbc0f6c05c5db1262f9d2a8d2eec1edb (diff) | |
download | chromium_src-f1ddc1da13daa47d4513ead413cd167faadd4c71.zip chromium_src-f1ddc1da13daa47d4513ead413cd167faadd4c71.tar.gz chromium_src-f1ddc1da13daa47d4513ead413cd167faadd4c71.tar.bz2 |
Cleanup:
- added GetRootWindowForDisplay
- Hookup GetDisplayMatching to DisplayManager
- Fixed comments
- Moved the display code from Shell to MultiDisplayManager
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10697071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/screen_win.cc')
-rw-r--r-- | ui/gfx/screen_win.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc index 5f1d7de..4758360 100644 --- a/ui/gfx/screen_win.cc +++ b/ui/gfx/screen_win.cc @@ -73,6 +73,14 @@ gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) { } // static +gfx::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) { + RECT other_bounds_rect = match_rect.ToRECT(); + MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( + &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); + return GetDisplay(monitor_info); +} + +// static gfx::Display Screen::GetPrimaryDisplay() { MONITORINFO mi = GetMonitorInfoForMonitor( MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY)); @@ -82,12 +90,4 @@ gfx::Display Screen::GetPrimaryDisplay() { return display; } -// static -gfx::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) { - RECT other_bounds_rect = match_rect.ToRECT(); - MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( - &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); - return GetDisplay(monitor_info); -} - } // namespace gfx |