| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( |
| 128 gfx::NativeView view, const gfx::Rect& screen_rect) const override; | 128 gfx::NativeView view, const gfx::Rect& screen_rect) const override; |
| 129 gfx::Rect DIPToScreenRectInWindow( | 129 gfx::Rect DIPToScreenRectInWindow( |
| 130 gfx::NativeView view, const gfx::Rect& dip_rect) const override; | 130 gfx::NativeView view, const gfx::Rect& dip_rect) const override; |
| 131 float GetScaleFactorForWindow(gfx::NativeView view) const override; |
| 131 | 132 |
| 132 void UpdateFromDisplayInfos(const std::vector<DisplayInfo>& display_infos); | 133 void UpdateFromDisplayInfos(const std::vector<DisplayInfo>& display_infos); |
| 133 | 134 |
| 134 // Virtual to support mocking by unit tests. | 135 // Virtual to support mocking by unit tests. |
| 135 virtual void Initialize(); | 136 virtual void Initialize(); |
| 136 virtual MONITORINFOEX MonitorInfoFromScreenPoint( | 137 virtual MONITORINFOEX MonitorInfoFromScreenPoint( |
| 137 const gfx::Point& screen_point) const; | 138 const gfx::Point& screen_point) const; |
| 138 virtual MONITORINFOEX MonitorInfoFromScreenRect(const gfx::Rect& screen_rect) | 139 virtual MONITORINFOEX MonitorInfoFromScreenRect(const gfx::Rect& screen_rect) |
| 139 const; | 140 const; |
| 140 virtual MONITORINFOEX MonitorInfoFromWindow(HWND hwnd, DWORD default_options) | 141 virtual MONITORINFOEX MonitorInfoFromWindow(HWND hwnd, DWORD default_options) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Current list of ScreenWinDisplays. | 186 // Current list of ScreenWinDisplays. |
| 186 std::vector<ScreenWinDisplay> screen_win_displays_; | 187 std::vector<ScreenWinDisplay> screen_win_displays_; |
| 187 | 188 |
| 188 DISALLOW_COPY_AND_ASSIGN(ScreenWin); | 189 DISALLOW_COPY_AND_ASSIGN(ScreenWin); |
| 189 }; | 190 }; |
| 190 | 191 |
| 191 } // namespace win | 192 } // namespace win |
| 192 } // namespace display | 193 } // namespace display |
| 193 | 194 |
| 194 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ | 195 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ |
| OLD | NEW |