| 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 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/Xrandr.h> | 7 #include <X11/extensions/Xrandr.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // It clashes with out RootWindow. | 10 // It clashes with out RootWindow. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 this, | 264 this, |
| 265 &DesktopScreenX11::ConfigureTimerFired); | 265 &DesktopScreenX11::ConfigureTimerFired); |
| 266 } | 266 } |
| 267 } else { | 267 } else { |
| 268 NOTREACHED(); | 268 NOTREACHED(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 return ui::POST_DISPATCH_NONE; | 271 return ui::POST_DISPATCH_NONE; |
| 272 } | 272 } |
| 273 | 273 |
| 274 // static | 274 void DesktopScreenX11::SetDeviceScaleFactorForTest(float scale_factor) { |
| 275 void DesktopScreenX11::UpdateDeviceScaleFactorForTest() { | 275 LOG(ERROR) << "SetDSF:" << scale_factor; |
| 276 DesktopScreenX11* screen = | 276 display::Display::SetForceDeviceScaleFactorForTesting(scale_factor); |
| 277 static_cast<DesktopScreenX11*>(display::Screen::GetScreen()); | 277 ConfigureTimerFired(); |
| 278 screen->ConfigureTimerFired(); | |
| 279 } | 278 } |
| 280 | 279 |
| 281 //////////////////////////////////////////////////////////////////////////////// | 280 //////////////////////////////////////////////////////////////////////////////// |
| 282 // DesktopScreenX11, private: | 281 // DesktopScreenX11, private: |
| 283 | 282 |
| 284 DesktopScreenX11::DesktopScreenX11( | 283 DesktopScreenX11::DesktopScreenX11( |
| 285 const std::vector<display::Display>& test_displays) | 284 const std::vector<display::Display>& test_displays) |
| 286 : xdisplay_(gfx::GetXDisplay()), | 285 : xdisplay_(gfx::GetXDisplay()), |
| 287 x_root_window_(DefaultRootWindow(xdisplay_)), | 286 x_root_window_(DefaultRootWindow(xdisplay_)), |
| 288 has_xrandr_(false), | 287 has_xrandr_(false), |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 GetPrimaryDisplay().device_scale_factor()); | 403 GetPrimaryDisplay().device_scale_factor()); |
| 405 } | 404 } |
| 406 | 405 |
| 407 //////////////////////////////////////////////////////////////////////////////// | 406 //////////////////////////////////////////////////////////////////////////////// |
| 408 | 407 |
| 409 display::Screen* CreateDesktopScreen() { | 408 display::Screen* CreateDesktopScreen() { |
| 410 return new DesktopScreenX11; | 409 return new DesktopScreenX11; |
| 411 } | 410 } |
| 412 | 411 |
| 413 } // namespace views | 412 } // namespace views |
| OLD | NEW |