Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: ui/display/win/screen_win.h

Issue 2665623002: Fix Jumplist favicons to have high resolution in HDPI Windows displays (Closed)
Patch Set: Update comments and remove redundant .h files. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 static int GetSystemMetricsForHwnd(HWND hwnd, int metric); 95 static int GetSystemMetricsForHwnd(HWND hwnd, int metric);
96 96
97 // Returns the result of GetSystemMetrics for |metric| in DIP. 97 // Returns the result of GetSystemMetrics for |metric| in DIP.
98 // Use this function if you need to work in DIP and can tolerate cascading 98 // Use this function if you need to work in DIP and can tolerate cascading
99 // rounding errors towards screen pixels. 99 // rounding errors towards screen pixels.
100 static int GetSystemMetricsInDIP(int metric); 100 static int GetSystemMetricsInDIP(int metric);
101 101
102 // Returns |hwnd|'s scale factor. 102 // Returns |hwnd|'s scale factor.
103 static float GetScaleFactorForHWND(HWND hwnd); 103 static float GetScaleFactorForHWND(HWND hwnd);
104 104
105 // Returns the largest device scale factor among all monitors.
106 static float GetLargestDeviceScaleFactor();
107
105 // Returns the HWND associated with the NativeView. 108 // Returns the HWND associated with the NativeView.
106 virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const; 109 virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const;
107 110
108 // Returns the NativeView associated with the HWND. 111 // Returns the NativeView associated with the HWND.
109 virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const; 112 virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const;
110 113
111 protected: 114 protected:
112 // Screen: 115 // Screen:
113 gfx::Point GetCursorScreenPoint() override; 116 gfx::Point GetCursorScreenPoint() override;
114 bool IsWindowUnderCursor(gfx::NativeWindow window) override; 117 bool IsWindowUnderCursor(gfx::NativeWindow window) override;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // This must be updated anytime |screen_win_displays_| is updated. 189 // This must be updated anytime |screen_win_displays_| is updated.
187 std::vector<Display> displays_; 190 std::vector<Display> displays_;
188 191
189 DISALLOW_COPY_AND_ASSIGN(ScreenWin); 192 DISALLOW_COPY_AND_ASSIGN(ScreenWin);
190 }; 193 };
191 194
192 } // namespace win 195 } // namespace win
193 } // namespace display 196 } // namespace display
194 197
195 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ 198 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698