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/views/widget | |
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/views/widget')
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_screen_x11.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc index 77dbaa4..a462da7 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc @@ -39,7 +39,8 @@ class DesktopScreenX11 : public gfx::Screen { virtual bool IsDIPEnabled() OVERRIDE; virtual gfx::Point GetCursorScreenPoint() OVERRIDE; virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; - virtual int GetNumDisplays() OVERRIDE; + virtual int GetNumDisplays() const OVERRIDE; + virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE; virtual gfx::Display GetDisplayNearestWindow( gfx::NativeView window) const OVERRIDE; virtual gfx::Display GetDisplayNearestPoint( @@ -95,12 +96,17 @@ gfx::NativeWindow DesktopScreenX11::GetWindowAtCursorScreenPoint() { return NULL; } -int DesktopScreenX11::GetNumDisplays() { +int DesktopScreenX11::GetNumDisplays() const { // TODO(erg): Figure this out with oshima or piman because I have no clue // about the XRandR implications here. return 1; } +std::vector<gfx::Display> DesktopScreenX11::GetAllDisplays() const { + // TODO(erg): Do the right thing once we know what that is. + return std::vector<gfx::Display>(1, GetPrimaryDisplay()); +} + gfx::Display DesktopScreenX11::GetDisplayNearestWindow( gfx::NativeView window) const { // TODO(erg): Do the right thing once we know what that is. |