| 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/window_observer.h" | 9 #include "ui/aura/window_observer.h" |
| 10 #include "ui/gfx/display.h" | 10 #include "ui/gfx/display.h" |
| 11 #include "ui/gfx/screen.h" | 11 #include "ui/gfx/screen.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Insets; | 14 class Insets; |
| 15 class Rect; | 15 class Rect; |
| 16 class Transform; | 16 class Transform; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace aura { | 19 namespace aura { |
| 20 class Window; | 20 class Window; |
| 21 class WindowTreeHost; | 21 class WindowTreeHost; |
| 22 | 22 |
| 23 // A minimal, testing Aura implementation of gfx::Screen. | 23 // A minimal, testing Aura implementation of gfx::Screen. |
| 24 // TODO(bruthig): Consider extending gfx::test::TestScreen. |
| 24 class TestScreen : public gfx::Screen, | 25 class TestScreen : public gfx::Screen, |
| 25 public WindowObserver { | 26 public WindowObserver { |
| 26 public: | 27 public: |
| 27 // Creates a gfx::Screen of the specified size. If no size is specified, then | 28 // Creates a gfx::Screen of the specified size. If no size is specified, then |
| 28 // creates a 800x600 screen. |size| is in physical pixels. | 29 // creates a 800x600 screen. |size| is in physical pixels. |
| 29 static TestScreen* Create(const gfx::Size& size); | 30 static TestScreen* Create(const gfx::Size& size); |
| 30 // Creates a TestScreen that uses fullscreen for the display. | 31 // Creates a TestScreen that uses fullscreen for the display. |
| 31 static TestScreen* CreateFullscreen(); | 32 static TestScreen* CreateFullscreen(); |
| 32 ~TestScreen() override; | 33 ~TestScreen() override; |
| 33 | 34 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 gfx::Display display_; | 70 gfx::Display display_; |
| 70 | 71 |
| 71 float ui_scale_; | 72 float ui_scale_; |
| 72 | 73 |
| 73 DISALLOW_COPY_AND_ASSIGN(TestScreen); | 74 DISALLOW_COPY_AND_ASSIGN(TestScreen); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace aura | 77 } // namespace aura |
| 77 | 78 |
| 78 #endif // UI_AURA_TEST_TEST_SCREEN_H_ | 79 #endif // UI_AURA_TEST_TEST_SCREEN_H_ |
| OLD | NEW |