diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 20:56:28 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 20:56:28 +0000 |
commit | 193b39d2ef3ec7a4f1692fd4448c515c06bb46d1 (patch) | |
tree | b35587f06293535725508764137b06c6c413c5ff /ash/screen_ash.cc | |
parent | 911cbcdade8c9386b68e3ee87cb9c2ea1c48db8e (diff) | |
download | chromium_src-193b39d2ef3ec7a4f1692fd4448c515c06bb46d1.zip chromium_src-193b39d2ef3ec7a4f1692fd4448c515c06bb46d1.tar.gz chromium_src-193b39d2ef3ec7a4f1692fd4448c515c06bb46d1.tar.bz2 |
Native bounds support to host windows.
* Moved SingleMonitorManager into separate file. This is a default
MonitorManager and creates RootWindow for PrimaryMonitor.
* Added MonitorObserver and moved monitor change logic to ash.
* MultiMonitorManager class and its layout logic will live in ash too.
* Added ability to move host window so that we can re-arrange root window when
switching primary monitor.
* Removed monitor_manager_x11, which I committed by accident.
* Use (0,0) for monitor/workarea bounds because the coordinate isn't translated yet
for non primary screens.
BUG=115510
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9703083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/screen_ash.cc')
-rw-r--r-- | ash/screen_ash.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc index 9847480..c884a15 100644 --- a/ash/screen_ash.cc +++ b/ash/screen_ash.cc @@ -12,6 +12,10 @@ namespace ash { +// TODO(oshima): For m19, the origin of work area/monitor bounds for +// views/aura is (0,0) because it's simple and enough. Fix this when +// real multi monitor support is implemented. + namespace { const aura::MonitorManager* GetMonitorManager() { return aura::Env::GetInstance()->monitor_manager(); @@ -37,7 +41,9 @@ gfx::Rect ScreenAsh::GetMonitorWorkAreaNearestWindowImpl( gfx::Rect ScreenAsh::GetMonitorAreaNearestWindowImpl( gfx::NativeWindow window) { - return GetMonitorManager()->GetMonitorNearestWindow(window)->bounds(); + // See the comment at the top. + return gfx::Rect( + GetMonitorManager()->GetMonitorNearestWindow(window)->size()); } gfx::Rect ScreenAsh::GetMonitorWorkAreaNearestPointImpl( @@ -47,7 +53,8 @@ gfx::Rect ScreenAsh::GetMonitorWorkAreaNearestPointImpl( } gfx::Rect ScreenAsh::GetMonitorAreaNearestPointImpl(const gfx::Point& point) { - return GetMonitorManager()->GetMonitorNearestPoint(point)->bounds(); + // See the comment at the top. + return gfx::Rect(GetMonitorManager()->GetMonitorNearestPoint(point)->size()); } gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPointImpl() { |