OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/display/chromeos/display_snapshot_virtual.h" | |
6 | |
7 #include "base/strings/stringprintf.h" | |
8 #include "ui/display/types/display_mode.h" | |
9 | |
10 namespace ui { | |
11 DisplaySnapshotVirtual::DisplaySnapshotVirtual(uint32_t index, | |
12 DisplayMode* mode) | |
13 : DisplaySnapshot(index, | |
14 gfx::Point(0, 0), | |
15 gfx::Size(200, 200), | |
Daniel Erat
2015/02/23 23:14:53
where do these numbers come from?
(i have flashba
dnicoara
2015/02/24 16:27:06
This would be the physical size of the display. We
robert.bradford
2015/03/03 19:58:00
I've put a TODO in here for now but would love to
| |
16 DISPLAY_CONNECTION_TYPE_VIRTUAL, | |
17 false, | |
18 false, | |
19 "Virtual output", | |
20 std::vector<const DisplayMode*>(), | |
21 NULL, | |
22 NULL) { | |
23 modes_.push_back(new DisplayMode(mode->size(), mode->is_interlaced(), | |
dnicoara
2015/02/24 16:27:06
This mode is leaking.
robert.bradford
2015/03/03 19:58:00
Fixed by adding a scoped_ptr member to store the i
| |
24 mode->refresh_rate())); | |
25 | |
26 native_mode_ = modes_.front(); | |
27 } | |
28 | |
29 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() { | |
30 } | |
31 | |
32 std::string DisplaySnapshotVirtual::ToString() const { | |
33 return base::StringPrintf( | |
34 "Virtual %s %s", | |
35 current_mode_ ? current_mode_->ToString().c_str() : "NULL", | |
36 physical_size_.ToString().c_str()); | |
37 } | |
38 | |
39 } // namespace ui | |
OLD | NEW |