| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } else { | 248 } else { |
| 249 NOTREACHED(); | 249 NOTREACHED(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 return ui::POST_DISPATCH_NONE; | 252 return ui::POST_DISPATCH_NONE; |
| 253 } | 253 } |
| 254 | 254 |
| 255 // static | 255 // static |
| 256 void DesktopScreenX11::UpdateDeviceScaleFactorForTest() { | 256 void DesktopScreenX11::UpdateDeviceScaleFactorForTest() { |
| 257 DesktopScreenX11* screen = | 257 DesktopScreenX11* screen = |
| 258 static_cast<DesktopScreenX11*>(gfx::Screen::GetNativeScreen()); | 258 static_cast<DesktopScreenX11*>(gfx::Screen::GetScreen()); |
| 259 screen->ConfigureTimerFired(); | 259 screen->ConfigureTimerFired(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 //////////////////////////////////////////////////////////////////////////////// | 262 //////////////////////////////////////////////////////////////////////////////// |
| 263 // DesktopScreenX11, private: | 263 // DesktopScreenX11, private: |
| 264 | 264 |
| 265 DesktopScreenX11::DesktopScreenX11( | 265 DesktopScreenX11::DesktopScreenX11( |
| 266 const std::vector<gfx::Display>& test_displays) | 266 const std::vector<gfx::Display>& test_displays) |
| 267 : xdisplay_(gfx::GetXDisplay()), | 267 : xdisplay_(gfx::GetXDisplay()), |
| 268 x_root_window_(DefaultRootWindow(xdisplay_)), | 268 x_root_window_(DefaultRootWindow(xdisplay_)), |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); | 367 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); |
| 368 } | 368 } |
| 369 | 369 |
| 370 //////////////////////////////////////////////////////////////////////////////// | 370 //////////////////////////////////////////////////////////////////////////////// |
| 371 | 371 |
| 372 gfx::Screen* CreateDesktopScreen() { | 372 gfx::Screen* CreateDesktopScreen() { |
| 373 return new DesktopScreenX11; | 373 return new DesktopScreenX11; |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace views | 376 } // namespace views |
| OLD | NEW |