| Index: ui/aura/screen_aura.cc
|
| diff --git a/ui/aura/screen_aura.cc b/ui/aura/screen_aura.cc
|
| index 27e070e2b44b0d17e90e8018964c4355366d6d36..28ccc87a91df0141d73b7f9ae41faaaa9c661658 100644
|
| --- a/ui/aura/screen_aura.cc
|
| +++ b/ui/aura/screen_aura.cc
|
| @@ -5,9 +5,10 @@
|
| #include "ui/aura/screen_aura.h"
|
|
|
| #include "base/logging.h"
|
| +#include "ui/aura/env.h"
|
| +#include "ui/aura/monitor.h"
|
| +#include "ui/aura/monitor_manager.h"
|
| #include "ui/aura/root_window.h"
|
| -#include "ui/aura/window.h"
|
| -#include "ui/gfx/native_widget_types.h"
|
|
|
| namespace aura {
|
|
|
| @@ -23,21 +24,26 @@ gfx::Point ScreenAura::GetCursorScreenPointImpl() {
|
|
|
| gfx::Rect ScreenAura::GetMonitorWorkAreaNearestWindowImpl(
|
| gfx::NativeWindow window) {
|
| - return GetWorkAreaBounds();
|
| + return Env::GetInstance()->monitor_manager()->
|
| + GetMonitorNearestWindow(window)->GetWorkAreaBounds();
|
| }
|
|
|
| gfx::Rect ScreenAura::GetMonitorAreaNearestWindowImpl(
|
| gfx::NativeWindow window) {
|
| - return GetBounds();
|
| + return Env::GetInstance()->monitor_manager()->
|
| + GetMonitorNearestWindow(window)->bounds();
|
| }
|
|
|
| gfx::Rect ScreenAura::GetMonitorWorkAreaNearestPointImpl(
|
| const gfx::Point& point) {
|
| - return GetWorkAreaBounds();
|
| + return Env::GetInstance()->monitor_manager()->
|
| + GetMonitorNearestPoint(point)->GetWorkAreaBounds();
|
| }
|
|
|
| -gfx::Rect ScreenAura::GetMonitorAreaNearestPointImpl(const gfx::Point& point) {
|
| - return GetBounds();
|
| +gfx::Rect ScreenAura::GetMonitorAreaNearestPointImpl(
|
| + const gfx::Point& point) {
|
| + return Env::GetInstance()->monitor_manager()->
|
| + GetMonitorNearestPoint(point)->bounds();
|
| }
|
|
|
| gfx::NativeWindow ScreenAura::GetWindowAtCursorScreenPointImpl() {
|
| @@ -45,22 +51,12 @@ gfx::NativeWindow ScreenAura::GetWindowAtCursorScreenPointImpl() {
|
| return root_window_->GetTopWindowContainingPoint(point);
|
| }
|
|
|
| -gfx::Rect ScreenAura::GetBounds() {
|
| - return gfx::Rect(root_window_->bounds().size());
|
| -}
|
| -
|
| -gfx::Rect ScreenAura::GetWorkAreaBounds() {
|
| - gfx::Rect bounds(GetBounds());
|
| - bounds.Inset(work_area_insets_);
|
| - return bounds;
|
| -}
|
| -
|
| gfx::Size ScreenAura::GetPrimaryMonitorSizeImpl() {
|
| - return GetMonitorWorkAreaNearestPoint(gfx::Point()).size();
|
| + return Env::GetInstance()->monitor_manager()->GetPrimaryMonitor()->size();
|
| }
|
|
|
| int ScreenAura::GetNumMonitorsImpl() {
|
| - return 1;
|
| + return Env::GetInstance()->monitor_manager()->GetNumMonitors();
|
| }
|
|
|
| } // namespace aura
|
|
|