| 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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 6 | 6 |
| 7 #include "ui/ozone/common/display_snapshot_proxy.h" | 7 #include "ui/ozone/common/display_snapshot_proxy.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 params.has_overscan, | 31 params.has_overscan, |
| 32 params.has_color_correction_matrix, | 32 params.has_color_correction_matrix, |
| 33 params.display_name, | 33 params.display_name, |
| 34 params.sys_path, | 34 params.sys_path, |
| 35 std::vector<std::unique_ptr<const DisplayMode>>(), | 35 std::vector<std::unique_ptr<const DisplayMode>>(), |
| 36 params.edid, | 36 params.edid, |
| 37 NULL, | 37 NULL, |
| 38 NULL), | 38 NULL), |
| 39 string_representation_(params.string_representation) { | 39 string_representation_(params.string_representation) { |
| 40 for (size_t i = 0; i < params.modes.size(); ++i) { | 40 for (size_t i = 0; i < params.modes.size(); ++i) { |
| 41 modes_.push_back(base::WrapUnique(new DisplayModeProxy(params.modes[i]))); | 41 modes_.push_back(base::MakeUnique<DisplayModeProxy>(params.modes[i])); |
| 42 | 42 |
| 43 if (params.has_current_mode && | 43 if (params.has_current_mode && |
| 44 SameModes(params.modes[i], params.current_mode)) | 44 SameModes(params.modes[i], params.current_mode)) |
| 45 current_mode_ = modes_.back().get(); | 45 current_mode_ = modes_.back().get(); |
| 46 | 46 |
| 47 if (params.has_native_mode && | 47 if (params.has_native_mode && |
| 48 SameModes(params.modes[i], params.native_mode)) | 48 SameModes(params.modes[i], params.native_mode)) |
| 49 native_mode_ = modes_.back().get(); | 49 native_mode_ = modes_.back().get(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 product_id_ = params.product_id; | 52 product_id_ = params.product_id; |
| 53 maximum_cursor_size_ = params.maximum_cursor_size; | 53 maximum_cursor_size_ = params.maximum_cursor_size; |
| 54 } | 54 } |
| 55 | 55 |
| 56 DisplaySnapshotProxy::~DisplaySnapshotProxy() { | 56 DisplaySnapshotProxy::~DisplaySnapshotProxy() { |
| 57 } | 57 } |
| 58 | 58 |
| 59 std::string DisplaySnapshotProxy::ToString() const { | 59 std::string DisplaySnapshotProxy::ToString() const { |
| 60 return string_representation_; | 60 return string_representation_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| OLD | NEW |