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

Side by Side Diff: ui/display/display_snapshot_mojo.cc

Issue 2738043004: Relocate display_snapshot_mojo (Closed)
Patch Set: Created 3 years, 9 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/display/display_snapshot_mojo.h ('k') | ui/display/mojo/display_snapshot_mojo.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 {
61 return "";
62 }
63
64 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/display_snapshot_mojo.h ('k') | ui/display/mojo/display_snapshot_mojo.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698