| Index: ui/aura/test/test_screen.cc
|
| diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc
|
| index e61db9fdcdc5ea8eb19f88072e052de29baa6297..d242d78e57742ae36c23b6395c30a9c86930ec36 100644
|
| --- a/ui/aura/test/test_screen.cc
|
| +++ b/ui/aura/test/test_screen.cc
|
| @@ -8,6 +8,7 @@
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| +#include "ui/gfx/screen.h"
|
|
|
| namespace aura {
|
|
|
| @@ -18,44 +19,34 @@ TestScreen::TestScreen(aura::RootWindow* root_window)
|
| TestScreen::~TestScreen() {
|
| }
|
|
|
| -gfx::Point TestScreen::GetCursorScreenPointImpl() {
|
| +gfx::Point TestScreen::GetCursorScreenPoint() {
|
| return root_window_->last_mouse_location();
|
| }
|
|
|
| -gfx::Rect TestScreen::GetMonitorWorkAreaNearestWindowImpl(
|
| - gfx::NativeWindow window) {
|
| - return GetBounds();
|
| -}
|
| -
|
| -gfx::Rect TestScreen::GetMonitorAreaNearestWindowImpl(
|
| - gfx::NativeWindow window) {
|
| - return GetBounds();
|
| -}
|
| -
|
| -gfx::Rect TestScreen::GetMonitorWorkAreaNearestPointImpl(
|
| - const gfx::Point& point) {
|
| - return GetBounds();
|
| +gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPoint() {
|
| + const gfx::Point point = gfx::Screen::GetCursorScreenPoint();
|
| + return root_window_->GetTopWindowContainingPoint(point);
|
| }
|
|
|
| -gfx::Rect TestScreen::GetMonitorAreaNearestPointImpl(const gfx::Point& point) {
|
| - return GetBounds();
|
| +int TestScreen::GetNumMonitors() {
|
| + return 1;
|
| }
|
|
|
| -gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPointImpl() {
|
| - const gfx::Point point = GetCursorScreenPoint();
|
| - return root_window_->GetTopWindowContainingPoint(point);
|
| +gfx::Monitor TestScreen::GetMonitorNearestWindow(
|
| + gfx::NativeWindow window) const {
|
| + return GetMonitor();
|
| }
|
|
|
| -gfx::Rect TestScreen::GetBounds() {
|
| - return gfx::Rect(root_window_->bounds().size());
|
| +gfx::Monitor TestScreen::GetMonitorNearestPoint(const gfx::Point& point) const {
|
| + return GetMonitor();
|
| }
|
|
|
| -gfx::Size TestScreen::GetPrimaryMonitorSizeImpl() {
|
| - return GetBounds().size();
|
| +gfx::Monitor TestScreen::GetPrimaryMonitor() const {
|
| + return GetMonitor();
|
| }
|
|
|
| -int TestScreen::GetNumMonitorsImpl() {
|
| - return 1;
|
| +gfx::Monitor TestScreen::GetMonitor() const {
|
| + return gfx::Monitor(0, root_window_->bounds());
|
| }
|
|
|
| } // namespace aura
|
|
|