OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/aura/window_observer.h" | 10 #include "ui/aura/window_observer.h" |
11 #include "ui/gfx/display.h" | 11 #include "ui/gfx/display.h" |
12 #include "ui/gfx/screen.h" | 12 #include "ui/gfx/screen.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Insets; | 15 class Insets; |
16 class Rect; | 16 class Rect; |
17 class Transform; | 17 class Transform; |
18 } | 18 } |
19 | 19 |
20 namespace aura { | 20 namespace aura { |
21 class Window; | 21 class Window; |
| 22 class WindowTreeClient; |
22 class WindowTreeHost; | 23 class WindowTreeHost; |
23 } | 24 } |
24 | 25 |
25 namespace headless { | 26 namespace headless { |
26 | 27 |
27 class HeadlessScreen : public gfx::Screen, public aura::WindowObserver { | 28 class HeadlessScreen : public gfx::Screen, public aura::WindowObserver { |
28 public: | 29 public: |
29 // Creates a gfx::Screen of the specified size. If no size is specified, then | 30 // Creates a gfx::Screen of the specified size. If no size is specified, then |
30 // creates a 800x600 screen. |size| is in physical pixels. | 31 // creates a 800x600 screen. |size| is in physical pixels. |
31 static HeadlessScreen* Create(const gfx::Size& size); | 32 static HeadlessScreen* Create(const gfx::Size& size); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 aura::WindowTreeHost* host_; | 68 aura::WindowTreeHost* host_; |
68 gfx::Display display_; | 69 gfx::Display display_; |
69 float ui_scale_; | 70 float ui_scale_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); | 72 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace headless | 75 } // namespace headless |
75 | 76 |
76 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ | 77 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ |
OLD | NEW |