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(int64_t display_id, |
| 12 gfx::Size display_size) |
| 13 : DisplaySnapshot(display_id, |
| 14 gfx::Point(0, 0), |
| 15 // TODO(robert.bradford): Use better physical dimensions. |
| 16 gfx::Size(200, 200), |
| 17 DISPLAY_CONNECTION_TYPE_VIRTUAL, |
| 18 false, |
| 19 false, |
| 20 "Virtual output", |
| 21 std::vector<const DisplayMode*>(), |
| 22 NULL, |
| 23 NULL) { |
| 24 mode_.reset(new DisplayMode(display_size, false, 30)); |
| 25 modes_.push_back(mode_.get()); |
| 26 |
| 27 native_mode_ = modes_.front(); |
| 28 } |
| 29 |
| 30 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() { |
| 31 } |
| 32 |
| 33 std::string DisplaySnapshotVirtual::ToString() const { |
| 34 return base::StringPrintf( |
| 35 "Virtual %s %s", |
| 36 current_mode_ ? current_mode_->ToString().c_str() : "NULL", |
| 37 physical_size_.ToString().c_str()); |
| 38 } |
| 39 |
| 40 } // namespace ui |
OLD | NEW |