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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_screen_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
index d3d2315bce9cb981ed62c4ab33d61c80d3616150..9c5906f5a3089513045f799612ecc05bedac621a 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
@@ -271,11 +271,10 @@ uint32_t DesktopScreenX11::DispatchEvent(const ui::PlatformEvent& event) {
return ui::POST_DISPATCH_NONE;
}
-// static
-void DesktopScreenX11::UpdateDeviceScaleFactorForTest() {
- DesktopScreenX11* screen =
- static_cast<DesktopScreenX11*>(display::Screen::GetScreen());
- screen->ConfigureTimerFired();
+void DesktopScreenX11::SetDeviceScaleFactorForTest(float scale_factor) {
+ LOG(ERROR) << "SetDSF:" << scale_factor;
+ display::Display::SetForceDeviceScaleFactorForTesting(scale_factor);
+ ConfigureTimerFired();
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698