Chromium Code Reviews| 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), | |
| 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(), | |
| 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 } // namespace ui | |
|
achuithb
2015/02/11 23:41:44
newline
| |
| OLD | NEW |