diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 17:08:51 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 17:08:51 +0000 |
commit | 1cee30c1a41f9122cfcbb3a7db6fccc591ebcc20 (patch) | |
tree | 061b0fc6ed53e2174fd1e28f7bd5b4452afb5e35 /ui/gfx/screen_win.cc | |
parent | 8a35afd5a12341513ffb7806de903b584fda9b72 (diff) | |
download | chromium_src-1cee30c1a41f9122cfcbb3a7db6fccc591ebcc20.zip chromium_src-1cee30c1a41f9122cfcbb3a7db6fccc591ebcc20.tar.gz chromium_src-1cee30c1a41f9122cfcbb3a7db6fccc591ebcc20.tar.bz2 |
Refactor display_info_provider_chrmoeos and provide standard impl for other
platforms.
Added gfx::Screen::GetAllDisplays()
I moved QueryInfo on Windows to UI thread as this gfx::Screen is already
querying this info on UI thread, and supposed to be fast.
Next Step:
Implement GetAllDisplays for win/mac/gtk.
BUG=122863
R=hongbo.min@intel.com, sky@chromium.org
Review URL: https://codereview.chromium.org/23205029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/screen_win.cc')
-rw-r--r-- | ui/gfx/screen_win.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc index 8bb1548..23dbc9d 100644 --- a/ui/gfx/screen_win.cc +++ b/ui/gfx/screen_win.cc @@ -55,10 +55,15 @@ gfx::NativeWindow ScreenWin::GetWindowAtCursorScreenPoint() { return GetNativeWindowFromHWND(window_hwnd); } -int ScreenWin::GetNumDisplays() { +int ScreenWin::GetNumDisplays() const { return GetSystemMetrics(SM_CMONITORS); } +std::vector<gfx::Display> ScreenWin::GetAllDisplays() const { + NOTIMPLEMENTED(); + return std::vector<gfx::Display>(1, GetPrimaryDisplay()); +} + gfx::Display ScreenWin::GetDisplayNearestWindow(gfx::NativeView window) const { HWND window_hwnd = GetHWNDFromNativeView(window); if (!window_hwnd) { |