Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/display/display_snapshot_mojo.h" | |
| 6 | |
| 7 #include "base/memory/ptr_util.h" | |
| 8 #include "ui/display/types/display_constants.h" | |
| 9 | |
| 10 namespace display { | |
| 11 | |
| 12 DisplaySnapshotMojo::DisplaySnapshotMojo(int64_t display_id, | |
| 13 const gfx::Point& origin, | |
| 14 const gfx::Size& physical_size, | |
| 15 DisplayConnectionType type, | |
| 16 bool is_aspect_preserving_scaling, | |
| 17 bool has_overscan, | |
| 18 bool has_color_correction_matrix, | |
| 19 std::string display_name, | |
| 20 const base::FilePath& sys_path, | |
| 21 int64_t product_id, | |
| 22 DisplayModeList modes, | |
| 23 const std::vector<uint8_t>& edid, | |
| 24 const DisplayMode* current_mode, | |
| 25 const DisplayMode* native_mode, | |
| 26 const gfx::Size& maximum_cursor_size) | |
| 27 : DisplaySnapshot(display_id, | |
| 28 origin, | |
| 29 physical_size, | |
| 30 type, | |
| 31 is_aspect_preserving_scaling, | |
| 32 has_overscan, | |
| 33 has_color_correction_matrix, | |
| 34 display_name, | |
| 35 sys_path, | |
| 36 std::move(modes), | |
| 37 edid, | |
| 38 current_mode, | |
| 39 native_mode) { | |
| 40 product_id_ = product_id; | |
| 41 maximum_cursor_size_ = maximum_cursor_size; | |
| 42 } | |
| 43 | |
| 44 DisplaySnapshotMojo::~DisplaySnapshotMojo() = default; | |
| 45 | |
| 46 std::unique_ptr<DisplaySnapshotMojo> DisplaySnapshotMojo::Clone() const { | |
| 47 DisplayModeList clone_modes; | |
| 48 for (auto& mode : modes()) | |
| 49 clone_modes.push_back(mode->Clone()); | |
| 50 | |
| 51 return base::MakeUnique<DisplaySnapshotMojo>( | |
| 52 display_id(), origin(), physical_size(), type(), | |
| 53 is_aspect_preserving_scaling(), has_overscan(), | |
| 54 has_color_correction_matrix(), display_name(), sys_path(), product_id(), | |
| 55 std::move(clone_modes), edid(), current_mode(), native_mode(), | |
| 56 maximum_cursor_size()); | |
| 57 } | |
| 58 | |
| 59 // TODO(thanhph): Implement ToString() for debugging purposes. | |
| 60 std::string DisplaySnapshotMojo::ToString() const { | |
|
rjkroege
2017/02/17 03:03:51
My recollection is that this method is used for mo
thanhph1
2017/02/21 16:52:17
I checked a few references to ToString() on code s
| |
| 61 return ""; | |
| 62 } | |
| 63 | |
| 64 } // namespace display | |
| OLD | NEW |