| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 // Creates a display::Screen of the specified size (physical pixels). | 22 // Creates a display::Screen of the specified size (physical pixels). |
| 23 static HeadlessScreen* Create(const gfx::Size& size); | 23 static HeadlessScreen* Create(const gfx::Size& size); |
| 24 ~HeadlessScreen() override; | 24 ~HeadlessScreen() override; |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 // display::Screen overrides: | 27 // display::Screen overrides: |
| 28 gfx::Point GetCursorScreenPoint() override; | 28 gfx::Point GetCursorScreenPoint() override; |
| 29 bool IsWindowUnderCursor(gfx::NativeWindow window) override; | 29 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
| 30 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | 30 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
| 31 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; | 31 display::Display GetDisplayNearestWindow( |
| 32 gfx::NativeWindow window) const override; |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 explicit HeadlessScreen(const gfx::Rect& screen_bounds); | 35 explicit HeadlessScreen(const gfx::Rect& screen_bounds); |
| 35 | 36 |
| 36 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); | 37 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 } // namespace headless | 40 } // namespace headless |
| 40 | 41 |
| 41 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ | 42 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ |
| OLD | NEW |