OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_ | 5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_ |
6 #define UI_AURA_TEST_TEST_SCREEN_H_ | 6 #define UI_AURA_TEST_TEST_SCREEN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/gfx/insets.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "ui/gfx/screen.h" | 11 #include "ui/gfx/screen_impl.h" |
12 | 12 |
13 namespace aura { | 13 namespace aura { |
14 class RootWindow; | 14 class RootWindow; |
15 | 15 |
16 // A minimal, testing Aura implementation of gfx::Screen. | 16 // A minimal, testing Aura implementation of gfx::Screen. |
17 class TestScreen : public gfx::Screen { | 17 class TestScreen : public gfx::ScreenImpl { |
18 public: | 18 public: |
19 explicit TestScreen(aura::RootWindow* root_window); | 19 explicit TestScreen(aura::RootWindow* root_window); |
20 virtual ~TestScreen(); | 20 virtual ~TestScreen(); |
21 | 21 |
22 protected: | 22 protected: |
23 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; | 23 // gfx::ScreenImpl overrides: |
24 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( | 24 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
25 gfx::NativeView view) OVERRIDE; | 25 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
26 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( | 26 virtual int GetNumMonitors() OVERRIDE; |
27 gfx::NativeView view) OVERRIDE; | 27 virtual gfx::Monitor GetMonitorNearestWindow( |
28 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( | 28 gfx::NativeView view) const OVERRIDE; |
29 const gfx::Point& point) OVERRIDE; | 29 virtual gfx::Monitor GetMonitorNearestPoint( |
30 virtual gfx::Rect GetMonitorAreaNearestPointImpl( | 30 const gfx::Point& point) const OVERRIDE; |
31 const gfx::Point& point) OVERRIDE; | 31 virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE; |
32 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; | |
33 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; | |
34 virtual int GetNumMonitorsImpl() OVERRIDE; | |
35 | 32 |
36 private: | 33 private: |
37 // We currently support only one monitor. These two methods return the bounds | 34 gfx::Monitor GetMonitor() const; |
38 // and work area. | |
39 gfx::Rect GetBounds(); | |
40 | 35 |
41 aura::RootWindow* root_window_; | 36 aura::RootWindow* root_window_; |
42 | 37 |
43 DISALLOW_COPY_AND_ASSIGN(TestScreen); | 38 DISALLOW_COPY_AND_ASSIGN(TestScreen); |
44 }; | 39 }; |
45 | 40 |
46 } // namespace aura | 41 } // namespace aura |
47 | 42 |
48 #endif // UI_AURA_TEST_TEST_SCREEN_H_ | 43 #endif // UI_AURA_TEST_TEST_SCREEN_H_ |
OLD | NEW |