| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIN_SCREEN_WIN_H_ | 5 #ifndef UI_DISPLAY_WIN_SCREEN_WIN_H_ |
| 6 #define UI_DISPLAY_WIN_SCREEN_WIN_H_ | 6 #define UI_DISPLAY_WIN_SCREEN_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Returns the NativeView associated with the HWND. | 108 // Returns the NativeView associated with the HWND. |
| 109 virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const; | 109 virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const; |
| 110 | 110 |
| 111 protected: | 111 protected: |
| 112 // display::Screen: | 112 // display::Screen: |
| 113 gfx::Point GetCursorScreenPoint() override; | 113 gfx::Point GetCursorScreenPoint() override; |
| 114 bool IsWindowUnderCursor(gfx::NativeWindow window) override; | 114 bool IsWindowUnderCursor(gfx::NativeWindow window) override; |
| 115 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; | 115 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
| 116 int GetNumDisplays() const override; | 116 int GetNumDisplays() const override; |
| 117 std::vector<display::Display> GetAllDisplays() const override; | 117 const std::vector<display::Display>& GetAllDisplays() const override; |
| 118 display::Display GetDisplayNearestWindow( | 118 display::Display GetDisplayNearestWindow( |
| 119 gfx::NativeView window) const override; | 119 gfx::NativeView window) const override; |
| 120 display::Display GetDisplayNearestPoint( | 120 display::Display GetDisplayNearestPoint( |
| 121 const gfx::Point& point) const override; | 121 const gfx::Point& point) const override; |
| 122 display::Display GetDisplayMatching( | 122 display::Display GetDisplayMatching( |
| 123 const gfx::Rect& match_rect) const override; | 123 const gfx::Rect& match_rect) const override; |
| 124 display::Display GetPrimaryDisplay() const override; | 124 display::Display GetPrimaryDisplay() const override; |
| 125 void AddObserver(display::DisplayObserver* observer) override; | 125 void AddObserver(display::DisplayObserver* observer) override; |
| 126 void RemoveObserver(display::DisplayObserver* observer) override; | 126 void RemoveObserver(display::DisplayObserver* observer) override; |
| 127 gfx::Rect ScreenToDIPRectInWindow( | 127 gfx::Rect ScreenToDIPRectInWindow( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void RecordDisplayScaleFactors() const; | 178 void RecordDisplayScaleFactors() const; |
| 179 | 179 |
| 180 // Helper implementing the DisplayObserver handling. | 180 // Helper implementing the DisplayObserver handling. |
| 181 DisplayChangeNotifier change_notifier_; | 181 DisplayChangeNotifier change_notifier_; |
| 182 | 182 |
| 183 std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_; | 183 std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_; |
| 184 | 184 |
| 185 // Current list of ScreenWinDisplays. | 185 // Current list of ScreenWinDisplays. |
| 186 std::vector<ScreenWinDisplay> screen_win_displays_; | 186 std::vector<ScreenWinDisplay> screen_win_displays_; |
| 187 | 187 |
| 188 // The display::Displays corresponding to |screen_win_displays_| for |
| 189 // GetAllDisplays(). This must be updated anytime |screen_win_displays_| is |
| 190 // updated. |
| 191 std::vector<display::Display> displays_; |
| 192 |
| 188 DISALLOW_COPY_AND_ASSIGN(ScreenWin); | 193 DISALLOW_COPY_AND_ASSIGN(ScreenWin); |
| 189 }; | 194 }; |
| 190 | 195 |
| 191 } // namespace win | 196 } // namespace win |
| 192 } // namespace display | 197 } // namespace display |
| 193 | 198 |
| 194 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ | 199 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ |
| OLD | NEW |