| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display/chromeos/x11/display_snapshot_x11.h" | 5 #include "ui/display/chromeos/x11/display_snapshot_x11.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "ui/display/chromeos/x11/display_mode_x11.h" | 8 #include "ui/display/chromeos/x11/display_mode_x11.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const DisplayMode* native_mode, | 22 const DisplayMode* native_mode, |
| 23 RROutput output, | 23 RROutput output, |
| 24 RRCrtc crtc, | 24 RRCrtc crtc, |
| 25 int index) | 25 int index) |
| 26 : DisplaySnapshot(display_id, | 26 : DisplaySnapshot(display_id, |
| 27 origin, | 27 origin, |
| 28 physical_size, | 28 physical_size, |
| 29 type, | 29 type, |
| 30 is_aspect_preserving_scaling, | 30 is_aspect_preserving_scaling, |
| 31 has_overscan, | 31 has_overscan, |
| 32 false, |
| 32 display_name, | 33 display_name, |
| 33 // TODO(jdufault): Figure out if we can get the file | 34 // TODO(jdufault): Figure out if we can get the file |
| 34 // descriptor that maps to the device. | 35 // descriptor that maps to the device. |
| 35 base::FilePath(), | 36 base::FilePath(), |
| 36 modes, | 37 modes, |
| 37 current_mode, | 38 current_mode, |
| 38 native_mode), | 39 native_mode), |
| 39 output_(output), | 40 output_(output), |
| 40 crtc_(crtc), | 41 crtc_(crtc), |
| 41 index_(index) {} | 42 index_(index) {} |
| 42 | 43 |
| 43 DisplaySnapshotX11::~DisplaySnapshotX11() {} | 44 DisplaySnapshotX11::~DisplaySnapshotX11() {} |
| 44 | 45 |
| 45 std::string DisplaySnapshotX11::ToString() const { | 46 std::string DisplaySnapshotX11::ToString() const { |
| 46 return base::StringPrintf( | 47 return base::StringPrintf( |
| 47 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]", | 48 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]", |
| 48 type_, | 49 type_, |
| 49 output_, | 50 output_, |
| 50 crtc_, | 51 crtc_, |
| 51 current_mode_ | 52 current_mode_ |
| 52 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id() | 53 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id() |
| 53 : 0, | 54 : 0, |
| 54 physical_size_.width(), | 55 physical_size_.width(), |
| 55 physical_size_.height()); | 56 physical_size_.height()); |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace ui | 59 } // namespace ui |
| OLD | NEW |