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" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 gfx::Transform GetUIScaleTransform() const; | 44 gfx::Transform GetUIScaleTransform() const; |
45 | 45 |
46 // WindowObserver overrides: | 46 // WindowObserver overrides: |
47 void OnWindowBoundsChanged(aura::Window* window, | 47 void OnWindowBoundsChanged(aura::Window* window, |
48 const gfx::Rect& old_bounds, | 48 const gfx::Rect& old_bounds, |
49 const gfx::Rect& new_bounds) override; | 49 const gfx::Rect& new_bounds) override; |
50 void OnWindowDestroying(aura::Window* window) override; | 50 void OnWindowDestroying(aura::Window* window) override; |
51 | 51 |
52 // gfx::Screen overrides: | 52 // gfx::Screen overrides: |
53 gfx::Point GetCursorScreenPoint() override; | 53 gfx::Point GetCursorScreenPoint() override; |
54 gfx::NativeWindow GetWindowUnderCursor() override; | 54 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
55 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | 55 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
56 int GetNumDisplays() const override; | 56 int GetNumDisplays() const override; |
57 std::vector<gfx::Display> GetAllDisplays() const override; | 57 std::vector<gfx::Display> GetAllDisplays() const override; |
58 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override; | 58 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override; |
59 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; | 59 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; |
60 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; | 60 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; |
61 gfx::Display GetPrimaryDisplay() const override; | 61 gfx::Display GetPrimaryDisplay() const override; |
62 void AddObserver(gfx::DisplayObserver* observer) override; | 62 void AddObserver(gfx::DisplayObserver* observer) override; |
63 void RemoveObserver(gfx::DisplayObserver* observer) override; | 63 void RemoveObserver(gfx::DisplayObserver* observer) override; |
64 | 64 |
65 private: | 65 private: |
66 explicit HeadlessScreen(const gfx::Rect& screen_bounds); | 66 explicit HeadlessScreen(const gfx::Rect& screen_bounds); |
67 | 67 |
68 aura::WindowTreeHost* host_; | 68 aura::WindowTreeHost* host_; |
69 gfx::Display display_; | 69 gfx::Display display_; |
70 float ui_scale_; | 70 float ui_scale_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); | 72 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace headless | 75 } // namespace headless |
76 | 76 |
77 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ | 77 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ |
OLD | NEW |