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/screen_impl.h" | 10 #include "ui/gfx/screen_impl.h" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 class RootWindow; | 13 class RootWindow; |
14 | 14 |
15 // A minimal, testing Aura implementation of gfx::Screen. | 15 // A minimal, testing Aura implementation of gfx::Screen. |
16 class TestScreen : public gfx::ScreenImpl { | 16 class TestScreen : public gfx::ScreenImpl { |
17 public: | 17 public: |
18 explicit TestScreen(aura::RootWindow* root_window); | 18 explicit TestScreen(aura::RootWindow* root_window); |
19 virtual ~TestScreen(); | 19 virtual ~TestScreen(); |
20 | 20 |
21 protected: | 21 protected: |
22 // gfx::ScreenImpl overrides: | 22 // gfx::ScreenImpl overrides: |
23 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 23 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
24 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 24 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
25 virtual int GetNumMonitors() OVERRIDE; | 25 virtual int GetNumMonitors() OVERRIDE; |
26 virtual gfx::Monitor GetMonitorNearestWindow( | 26 virtual gfx::Display GetMonitorNearestWindow( |
27 gfx::NativeView view) const OVERRIDE; | 27 gfx::NativeView view) const OVERRIDE; |
28 virtual gfx::Monitor GetMonitorNearestPoint( | 28 virtual gfx::Display GetMonitorNearestPoint( |
29 const gfx::Point& point) const OVERRIDE; | 29 const gfx::Point& point) const OVERRIDE; |
30 virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE; | 30 virtual gfx::Display GetPrimaryMonitor() const OVERRIDE; |
31 | 31 |
32 private: | 32 private: |
33 gfx::Monitor GetMonitor() const; | 33 gfx::Display GetMonitor() const; |
34 | 34 |
35 aura::RootWindow* root_window_; | 35 aura::RootWindow* root_window_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(TestScreen); | 37 DISALLOW_COPY_AND_ASSIGN(TestScreen); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace aura | 40 } // namespace aura |
41 | 41 |
42 #endif // UI_AURA_TEST_TEST_SCREEN_H_ | 42 #endif // UI_AURA_TEST_TEST_SCREEN_H_ |
OLD | NEW |