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

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

Issue 1555163002: Revert "Revert of Support device scale factor test with popups in LayoutTest (patchset #2 id:40001 … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hypothentical fix Created 4 years, 11 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
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.
11 #undef RootWindow 11 #undef RootWindow
12 12
13 #include "base/command_line.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/strings/stringprintf.h"
14 #include "base/trace_event/trace_event.h" 16 #include "base/trace_event/trace_event.h"
15 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
16 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
17 #include "ui/aura/window_tree_host.h" 19 #include "ui/aura/window_tree_host.h"
18 #include "ui/base/layout.h" 20 #include "ui/base/layout.h"
19 #include "ui/display/util/display_util.h" 21 #include "ui/display/util/display_util.h"
20 #include "ui/display/util/x11/edid_parser_x11.h" 22 #include "ui/display/util/x11/edid_parser_x11.h"
21 #include "ui/events/platform/platform_event_source.h" 23 #include "ui/events/platform/platform_event_source.h"
22 #include "ui/gfx/display.h" 24 #include "ui/gfx/display.h"
23 #include "ui/gfx/geometry/point_conversions.h" 25 #include "ui/gfx/geometry/point_conversions.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 this, 247 this,
246 &DesktopScreenX11::ConfigureTimerFired); 248 &DesktopScreenX11::ConfigureTimerFired);
247 } 249 }
248 } else { 250 } else {
249 NOTREACHED(); 251 NOTREACHED();
250 } 252 }
251 253
252 return ui::POST_DISPATCH_NONE; 254 return ui::POST_DISPATCH_NONE;
253 } 255 }
254 256
255 // static
256 void DesktopScreenX11::UpdateDeviceScaleFactorForTest() {
257 DesktopScreenX11* screen =
258 static_cast<DesktopScreenX11*>(gfx::Screen::GetNativeScreen());
259 screen->ConfigureTimerFired();
260 }
261
262 //////////////////////////////////////////////////////////////////////////////// 257 ////////////////////////////////////////////////////////////////////////////////
263 // DesktopScreenX11, private: 258 // DesktopScreenX11, private:
264 259
265 DesktopScreenX11::DesktopScreenX11( 260 DesktopScreenX11::DesktopScreenX11(
266 const std::vector<gfx::Display>& test_displays) 261 const std::vector<gfx::Display>& test_displays)
267 : xdisplay_(gfx::GetXDisplay()), 262 : xdisplay_(gfx::GetXDisplay()),
268 x_root_window_(DefaultRootWindow(xdisplay_)), 263 x_root_window_(DefaultRootWindow(xdisplay_)),
269 has_xrandr_(false), 264 has_xrandr_(false),
270 xrandr_event_base_(0), 265 xrandr_event_base_(0),
271 displays_(test_displays) { 266 displays_(test_displays) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); 362 change_notifier_.NotifyDisplaysChanged(old_displays, displays_);
368 } 363 }
369 364
370 //////////////////////////////////////////////////////////////////////////////// 365 ////////////////////////////////////////////////////////////////////////////////
371 366
372 gfx::Screen* CreateDesktopScreen() { 367 gfx::Screen* CreateDesktopScreen() {
373 return new DesktopScreenX11; 368 return new DesktopScreenX11;
374 } 369 }
375 370
376 } // namespace views 371 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698