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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 1534563002: Move to DesktopScreenX11::UpdateDeviceScaleFactor to TestApi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win build Created 5 years 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 | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | 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 #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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 this, 247 this,
248 &DesktopScreenX11::ConfigureTimerFired); 248 &DesktopScreenX11::ConfigureTimerFired);
249 } 249 }
250 } else { 250 } else {
251 NOTREACHED(); 251 NOTREACHED();
252 } 252 }
253 253
254 return ui::POST_DISPATCH_NONE; 254 return ui::POST_DISPATCH_NONE;
255 } 255 }
256 256
257 // static
258 void DesktopScreenX11::UpdateDeviceScaleFactorForTest() {
259 DesktopScreenX11* screen =
260 static_cast<DesktopScreenX11*>(gfx::Screen::GetNativeScreen());
261 screen->ConfigureTimerFired();
262 }
263
264 //////////////////////////////////////////////////////////////////////////////// 257 ////////////////////////////////////////////////////////////////////////////////
265 // DesktopScreenX11, private: 258 // DesktopScreenX11, private:
266 259
267 DesktopScreenX11::DesktopScreenX11( 260 DesktopScreenX11::DesktopScreenX11(
268 const std::vector<gfx::Display>& test_displays) 261 const std::vector<gfx::Display>& test_displays)
269 : xdisplay_(gfx::GetXDisplay()), 262 : xdisplay_(gfx::GetXDisplay()),
270 x_root_window_(DefaultRootWindow(xdisplay_)), 263 x_root_window_(DefaultRootWindow(xdisplay_)),
271 has_xrandr_(false), 264 has_xrandr_(false),
272 xrandr_event_base_(0), 265 xrandr_event_base_(0),
273 displays_(test_displays) { 266 displays_(test_displays) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); 362 change_notifier_.NotifyDisplaysChanged(old_displays, displays_);
370 } 363 }
371 364
372 //////////////////////////////////////////////////////////////////////////////// 365 ////////////////////////////////////////////////////////////////////////////////
373 366
374 gfx::Screen* CreateDesktopScreen() { 367 gfx::Screen* CreateDesktopScreen() {
375 return new DesktopScreenX11; 368 return new DesktopScreenX11;
376 } 369 }
377 370
378 } // namespace views 371 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698