| 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 UI_DISPLAY_SCREEN_BASE_H_ | 5 #ifndef UI_DISPLAY_SCREEN_BASE_H_ |
| 6 #define UI_DISPLAY_SCREEN_BASE_H_ | 6 #define UI_DISPLAY_SCREEN_BASE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ui/display/display.h" | 10 #include "ui/display/display.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 ~ScreenBase() override; | 21 ~ScreenBase() override; |
| 22 | 22 |
| 23 DisplayList& display_list() { return display_list_; }; | 23 DisplayList& display_list() { return display_list_; }; |
| 24 const DisplayList& display_list() const { return display_list_; }; | 24 const DisplayList& display_list() const { return display_list_; }; |
| 25 | 25 |
| 26 // Screen: | 26 // Screen: |
| 27 gfx::Point GetCursorScreenPoint() override; | 27 gfx::Point GetCursorScreenPoint() override; |
| 28 bool IsWindowUnderCursor(gfx::NativeWindow window) override; | 28 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
| 29 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | 29 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
| 30 Display GetPrimaryDisplay() const override; | 30 Display GetPrimaryDisplay() const override; |
| 31 Display GetDisplayNearestWindow(gfx::NativeView view) const override; | 31 Display GetDisplayNearestWindow(gfx::NativeWindow window) const override; |
| 32 Display GetDisplayNearestPoint(const gfx::Point& point) const override; | 32 Display GetDisplayNearestPoint(const gfx::Point& point) const override; |
| 33 int GetNumDisplays() const override; | 33 int GetNumDisplays() const override; |
| 34 const std::vector<Display>& GetAllDisplays() const override; | 34 const std::vector<Display>& GetAllDisplays() const override; |
| 35 Display GetDisplayMatching(const gfx::Rect& match_rect) const override; | 35 Display GetDisplayMatching(const gfx::Rect& match_rect) const override; |
| 36 void AddObserver(DisplayObserver* observer) override; | 36 void AddObserver(DisplayObserver* observer) override; |
| 37 void RemoveObserver(DisplayObserver* observer) override; | 37 void RemoveObserver(DisplayObserver* observer) override; |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 // Invoked when a display changed in some way, including being added. | 40 // Invoked when a display changed in some way, including being added. |
| 41 // If |is_primary| is true, |changed_display| is the primary display. | 41 // If |is_primary| is true, |changed_display| is the primary display. |
| 42 void ProcessDisplayChanged(const Display& changed_display, bool is_primary); | 42 void ProcessDisplayChanged(const Display& changed_display, bool is_primary); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 DisplayList display_list_; | 45 DisplayList display_list_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(ScreenBase); | 47 DISALLOW_COPY_AND_ASSIGN(ScreenBase); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace display | 50 } // namespace display |
| 51 | 51 |
| 52 #endif // UI_DISPLAY_SCREEN_BASE_H_ | 52 #endif // UI_DISPLAY_SCREEN_BASE_H_ |
| OLD | NEW |