Chromium Code Reviews| Index: ui/display/win/screen_win.cc |
| diff --git a/ui/display/win/screen_win.cc b/ui/display/win/screen_win.cc |
| index 636eb90dc3add9da339676e9612aba3990aeeaae..912ef96cf3a71f2611e57f08d3acb099342c8c29 100644 |
| --- a/ui/display/win/screen_win.cc |
| +++ b/ui/display/win/screen_win.cc |
| @@ -406,6 +406,16 @@ Display ScreenWin::GetDisplayNearestWindow(gfx::NativeView window) const { |
| return screen_win_display.display(); |
| } |
| +Display GetDisplayNearestView(gfx::NativeView view) const { |
| + HWND window_hwnd = GetHWNDFromNativeView(view); |
| + if (!window_hwnd) { |
| + return GetPrimaryDisplay(); |
| + } |
| + ScreenWinDisplay screen_win_display = |
| + GetScreenWinDisplayNearestHWND(window_hwnd); |
| + return screen_win_display.display(); |
| +} |
|
tapted
2017/03/09 00:47:42
This is identical to GetDisplayNearestWindow. Is t
Jinsuk Kim
2017/03/09 01:56:17
Right this is not necessary since Windows always u
|
| + |
| Display ScreenWin::GetDisplayNearestPoint(const gfx::Point& point) const { |
| gfx::Point screen_point(DIPToScreenPoint(point)); |
| ScreenWinDisplay screen_win_display = |