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

Side by Side Diff: trunk/src/chromeos/display/real_output_configurator_delegate.cc

Issue 24365012: Revert 225054 "linux_aura: Implement most of DesktopScreenX11." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/chromeos/display/output_util_unittest.cc ('k') | trunk/src/ui/views/views.gyp » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chromeos/display/real_output_configurator_delegate.h" 5 #include "chromeos/display/real_output_configurator_delegate.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/extensions/dpms.h> 9 #include <X11/extensions/dpms.h>
10 #include <X11/extensions/XInput.h> 10 #include <X11/extensions/XInput.h>
11 #include <X11/extensions/XInput2.h> 11 #include <X11/extensions/XInput2.h>
12 #include <X11/extensions/Xrandr.h> 12 #include <X11/extensions/Xrandr.h>
13 13
14 #include <cmath> 14 #include <cmath>
15 #include <set> 15 #include <set>
16 #include <utility> 16 #include <utility>
17 17
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/message_loop/message_pump_x11.h" 19 #include "base/message_loop/message_pump_x11.h"
20 #include "base/x11/edid_parser_x11.h"
21 #include "chromeos/dbus/dbus_thread_manager.h" 20 #include "chromeos/dbus/dbus_thread_manager.h"
22 #include "chromeos/dbus/power_manager_client.h" 21 #include "chromeos/dbus/power_manager_client.h"
23 #include "chromeos/display/output_util.h" 22 #include "chromeos/display/output_util.h"
24 23
25 namespace chromeos { 24 namespace chromeos {
26 25
27 namespace { 26 namespace {
28 27
29 // DPI measurements. 28 // DPI measurements.
30 const float kMmInInch = 25.4; 29 const float kMmInInch = 25.4;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 OutputConfigurator::OutputSnapshot 256 OutputConfigurator::OutputSnapshot
258 RealOutputConfiguratorDelegate::InitOutputSnapshot( 257 RealOutputConfiguratorDelegate::InitOutputSnapshot(
259 RROutput id, 258 RROutput id,
260 XRROutputInfo* info, 259 XRROutputInfo* info,
261 RRCrtc* last_used_crtc, 260 RRCrtc* last_used_crtc,
262 int index) { 261 int index) {
263 OutputConfigurator::OutputSnapshot output; 262 OutputConfigurator::OutputSnapshot output;
264 output.output = id; 263 output.output = id;
265 output.width_mm = info->mm_width; 264 output.width_mm = info->mm_width;
266 output.height_mm = info->mm_height; 265 output.height_mm = info->mm_height;
267 output.has_display_id = base::GetDisplayId(id, index, &output.display_id); 266 output.has_display_id = GetDisplayId(id, index, &output.display_id);
268 output.is_internal = IsInternalOutput(info); 267 output.is_internal = IsInternalOutput(info);
269 output.index = index; 268 output.index = index;
270 269
271 // Use the index as a valid display ID even if the internal 270 // Use the index as a valid display ID even if the internal
272 // display doesn't have valid EDID because the index 271 // display doesn't have valid EDID because the index
273 // will never change. 272 // will never change.
274 if (!output.has_display_id && output.is_internal) 273 if (!output.has_display_id && output.is_internal)
275 output.has_display_id = true; 274 output.has_display_id = true;
276 275
277 if (info->crtc) { 276 if (info->crtc) {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 << (*outputs)[i].touch_device_id << " to output #" << i; 500 << (*outputs)[i].touch_device_id << " to output #" << i;
502 break; 501 break;
503 } 502 }
504 } 503 }
505 } 504 }
506 505
507 XIFreeDeviceInfo(info); 506 XIFreeDeviceInfo(info);
508 } 507 }
509 508
510 } // namespace chromeos 509 } // namespace chromeos
OLDNEW
« no previous file with comments | « trunk/src/chromeos/display/output_util_unittest.cc ('k') | trunk/src/ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698