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 <inttypes.h> | |
8 | |
9 #include "base/strings/stringprintf.h" | |
10 #include "ui/display/types/display_mode.h" | |
11 | |
12 namespace ui { | |
13 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id, | |
14 gfx::Size display_size) | |
15 : DisplaySnapshot(display_id, | |
16 gfx::Point(0, 0), | |
17 // TODO(robert.bradford): Use better physical dimensions. | |
18 gfx::Size(200, 200), | |
oshima
2015/11/24 22:19:27
why not display_size ?
robert.bradford
2015/11/26 16:29:40
This parameter is for the physical size. I've repl
oshima
2015/12/02 20:34:27
I think this will be used to compute the DPI thres
robert.bradford
2015/12/03 18:44:57
Or, as i've just posted, calculate the physical di
oshima
2015/12/03 18:54:07
sgtm
| |
19 DISPLAY_CONNECTION_TYPE_VIRTUAL, | |
20 false, | |
21 false, | |
22 "Virtual display", | |
23 std::vector<const DisplayMode*>(), | |
24 NULL, | |
25 NULL) { | |
26 mode_.reset(new DisplayMode(display_size, false, 30)); | |
27 modes_.push_back(mode_.get()); | |
28 | |
29 native_mode_ = modes_.front(); | |
30 } | |
31 | |
32 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {} | |
33 | |
34 std::string DisplaySnapshotVirtual::ToString() const { | |
35 return base::StringPrintf( | |
36 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_, | |
37 current_mode_ ? current_mode_->ToString().c_str() : "NULL", | |
38 physical_size_.ToString().c_str()); | |
39 } | |
40 | |
41 } // namespace ui | |
OLD | NEW |