| Index: ui/aura/screen_aura.cc
|
| diff --git a/ui/gfx/screen_aura.cc b/ui/aura/screen_aura.cc
|
| similarity index 59%
|
| copy from ui/gfx/screen_aura.cc
|
| copy to ui/aura/screen_aura.cc
|
| index b343f36b3bf562b74b09855c028daf635571f061..876f140979b668e6339cfdda23130781108f9aa0 100644
|
| --- a/ui/gfx/screen_aura.cc
|
| +++ b/ui/aura/screen_aura.cc
|
| @@ -2,15 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ui/gfx/screen.h"
|
| -
|
| -#if defined(OS_WIN)
|
| -#include <windows.h>
|
| -#endif
|
| +#include "ui/aura/screen_aura.h"
|
|
|
| #include "base/logging.h"
|
| #include "ui/aura/desktop.h"
|
| -#include "ui/aura/window.h"
|
| #include "ui/gfx/native_widget_types.h"
|
|
|
| namespace {
|
| @@ -23,46 +18,42 @@ gfx::Rect GetMonitorAreaOrWorkAreaNearestPoint(const gfx::Point& point,
|
|
|
| } // namespace
|
|
|
| -namespace gfx {
|
| +namespace aura {
|
| +namespace internal {
|
|
|
| -// static
|
| -gfx::Point Screen::GetCursorScreenPoint() {
|
| -#if defined(OS_WIN)
|
| - POINT pt;
|
| - GetCursorPos(&pt);
|
| - return gfx::Point(pt);
|
| -#endif
|
| - NOTIMPLEMENTED();
|
| - return gfx::Point();
|
| +ScreenAura::ScreenAura() {
|
| +}
|
| +
|
| +ScreenAura::~ScreenAura() {
|
| }
|
|
|
| -// static
|
| -gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
|
| +gfx::Rect ScreenAura::GetMonitorWorkAreaNearestWindowImpl(
|
| + gfx::NativeWindow window) {
|
| gfx::Rect bounds = GetMonitorAreaNearestWindow(window);
|
| // Emulate that a work area can be smaller than its monitor.
|
| bounds.Inset(10, 10, 10, 10);
|
| return bounds;
|
| }
|
|
|
| -// static
|
| -gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeWindow window) {
|
| +gfx::Rect ScreenAura::GetMonitorAreaNearestWindowImpl(
|
| + gfx::NativeWindow window) {
|
| // TODO(oshima): Take point/work_area into account. Support multiple monitors.
|
| return gfx::Rect(aura::Desktop::GetInstance()->GetSize());
|
| }
|
|
|
| -// static
|
| -gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) {
|
| +gfx::Rect ScreenAura::GetMonitorWorkAreaNearestPointImpl(
|
| + const gfx::Point& point) {
|
| return GetMonitorAreaOrWorkAreaNearestPoint(point, true);
|
| }
|
|
|
| -// static
|
| -gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
|
| +gfx::Rect ScreenAura::GetMonitorAreaNearestPointImpl(const gfx::Point& point) {
|
| return GetMonitorAreaOrWorkAreaNearestPoint(point, false);
|
| }
|
|
|
| -gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
|
| +gfx::NativeWindow ScreenAura::GetWindowAtCursorScreenPointImpl() {
|
| NOTIMPLEMENTED();
|
| return NULL;
|
| }
|
|
|
| -} // namespace gfx
|
| +} // namespace internal
|
| +} // namespace aura
|
|
|