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