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

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

Issue 1671223002: Revert of Give user ability to file a feedback report from the display error notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « ui/ozone/platform/drm/common/drm_util.cc ('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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 bool is_connected = (output_info->connection == RR_Connected); 303 bool is_connected = (output_info->connection == RR_Connected);
304 if (!is_connected) 304 if (!is_connected)
305 continue; 305 continue;
306 306
307 if (output_info->crtc) { 307 if (output_info->crtc) {
308 gfx::XScopedPtr<XRRCrtcInfo, 308 gfx::XScopedPtr<XRRCrtcInfo,
309 gfx::XObjectDeleter<XRRCrtcInfo, void, XRRFreeCrtcInfo>> 309 gfx::XObjectDeleter<XRRCrtcInfo, void, XRRFreeCrtcInfo>>
310 crtc(XRRGetCrtcInfo(xdisplay_, resources.get(), output_info->crtc)); 310 crtc(XRRGetCrtcInfo(xdisplay_, resources.get(), output_info->crtc));
311 311
312 int64_t display_id = -1; 312 int64_t display_id = -1;
313 if (!ui::EDIDParserX11(output_id).GetDisplayId(static_cast<uint8_t>(i), 313 if (!ui::GetDisplayId(output_id, static_cast<uint8_t>(i), &display_id)) {
314 &display_id)) {
315 // It isn't ideal, but if we can't parse the EDID data, fallback on the 314 // It isn't ideal, but if we can't parse the EDID data, fallback on the
316 // display number. 315 // display number.
317 display_id = i; 316 display_id = i;
318 } 317 }
319 318
320 gfx::Rect crtc_bounds(crtc->x, crtc->y, crtc->width, crtc->height); 319 gfx::Rect crtc_bounds(crtc->x, crtc->y, crtc->width, crtc->height);
321 gfx::Display display(display_id, crtc_bounds); 320 gfx::Display display(display_id, crtc_bounds);
322 321
323 if (!gfx::Display::HasForceDeviceScaleFactor()) { 322 if (!gfx::Display::HasForceDeviceScaleFactor()) {
324 display.SetScaleAndBounds(device_scale_factor, crtc_bounds); 323 display.SetScaleAndBounds(device_scale_factor, crtc_bounds);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); 367 change_notifier_.NotifyDisplaysChanged(old_displays, displays_);
369 } 368 }
370 369
371 //////////////////////////////////////////////////////////////////////////////// 370 ////////////////////////////////////////////////////////////////////////////////
372 371
373 gfx::Screen* CreateDesktopScreen() { 372 gfx::Screen* CreateDesktopScreen() {
374 return new DesktopScreenX11; 373 return new DesktopScreenX11;
375 } 374 }
376 375
377 } // namespace views 376 } // namespace views
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/common/drm_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698