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 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/aura/aura_export.h" | |
9 #include "ui/aura/window_observer.h" | 10 #include "ui/aura/window_observer.h" |
10 #include "ui/gfx/display.h" | 11 #include "ui/gfx/display.h" |
11 #include "ui/gfx/screen.h" | 12 #include "ui/gfx/screen.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class Rect; | 15 class Rect; |
15 class Transform; | 16 class Transform; |
16 } | 17 } |
17 | 18 |
18 namespace aura { | 19 namespace aura { |
19 class Window; | 20 class Window; |
20 class WindowTreeHost; | 21 class WindowTreeHost; |
21 | 22 |
22 // A minimal, testing Aura implementation of gfx::Screen. | 23 // A minimal, testing Aura implementation of gfx::Screen. |
23 class TestScreen : public gfx::Screen, | 24 class AURA_EXPORT TestScreen : public gfx::Screen, |
24 public WindowObserver { | 25 public WindowObserver { |
sadrul
2014/08/11 18:35:40
this is built in aura_test_support, which is alway
flackr
2014/08/13 15:52:36
Done.
| |
25 public: | 26 public: |
26 // Creates a gfx::Screen of the specified size. If no size is specified, then | 27 // Creates a gfx::Screen of the specified size. If no size is specified, then |
27 // creates a 800x600 screen. |size| is in physical pixels. | 28 // creates a 800x600 screen. |size| is in physical pixels. |
28 static TestScreen* Create(const gfx::Size& size); | 29 static TestScreen* Create(const gfx::Size& size); |
29 // Creates a TestScreen that uses fullscreen for the display. | 30 // Creates a TestScreen that uses fullscreen for the display. |
30 static TestScreen* CreateFullscreen(); | 31 static TestScreen* CreateFullscreen(); |
31 virtual ~TestScreen(); | 32 virtual ~TestScreen(); |
32 | 33 |
33 WindowTreeHost* CreateHostForPrimaryDisplay(); | 34 WindowTreeHost* CreateHostForPrimaryDisplay(); |
34 | 35 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 gfx::Display display_; | 73 gfx::Display display_; |
73 | 74 |
74 float ui_scale_; | 75 float ui_scale_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(TestScreen); | 77 DISALLOW_COPY_AND_ASSIGN(TestScreen); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace aura | 80 } // namespace aura |
80 | 81 |
81 #endif // UI_AURA_TEST_TEST_SCREEN_H_ | 82 #endif // UI_AURA_TEST_TEST_SCREEN_H_ |
OLD | NEW |