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

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

Issue 2151413002: Add a UMA histogram for a user's device scale at startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit comment Created 4 years, 5 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
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 ScreenWinDisplay GetScreenWinDisplay(const MONITORINFOEX& monitor_info) const; 160 ScreenWinDisplay GetScreenWinDisplay(const MONITORINFOEX& monitor_info) const;
161 161
162 static float GetScaleFactorForHWND(HWND hwnd); 162 static float GetScaleFactorForHWND(HWND hwnd);
163 163
164 // Returns the result of calling |getter| with |value| on the global 164 // Returns the result of calling |getter| with |value| on the global
165 // ScreenWin if it exists, otherwise return the default ScreenWinDisplay. 165 // ScreenWin if it exists, otherwise return the default ScreenWinDisplay.
166 template <typename Getter, typename GetterType> 166 template <typename Getter, typename GetterType>
167 static ScreenWinDisplay GetScreenWinDisplayVia(Getter getter, 167 static ScreenWinDisplay GetScreenWinDisplayVia(Getter getter,
168 GetterType value); 168 GetterType value);
169 169
170 void RecordDisplayScaleFactors() const;
171
170 // Helper implementing the DisplayObserver handling. 172 // Helper implementing the DisplayObserver handling.
171 DisplayChangeNotifier change_notifier_; 173 DisplayChangeNotifier change_notifier_;
172 174
173 std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_; 175 std::unique_ptr<gfx::SingletonHwndObserver> singleton_hwnd_observer_;
174 176
175 // Current list of ScreenWinDisplays. 177 // Current list of ScreenWinDisplays.
176 std::vector<ScreenWinDisplay> screen_win_displays_; 178 std::vector<ScreenWinDisplay> screen_win_displays_;
177 179
178 DISALLOW_COPY_AND_ASSIGN(ScreenWin); 180 DISALLOW_COPY_AND_ASSIGN(ScreenWin);
179 }; 181 };
180 182
181 } // namespace win 183 } // namespace win
182 } // namespace display 184 } // namespace display
183 185
184 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_ 186 #endif // UI_DISPLAY_WIN_SCREEN_WIN_H_
OLDNEW
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698