Index: ui/display/chromeos/display_snapshot_virtual.cc |
diff --git a/ui/display/chromeos/display_snapshot_virtual.cc b/ui/display/chromeos/display_snapshot_virtual.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..98596854837cd2c6706246d5049c684d4758f9d3 |
--- /dev/null |
+++ b/ui/display/chromeos/display_snapshot_virtual.cc |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/display/chromeos/display_snapshot_virtual.h" |
+ |
+#include "base/strings/stringprintf.h" |
+#include "ui/display/types/display_mode.h" |
+ |
+namespace ui { |
+DisplaySnapshotVirtual::DisplaySnapshotVirtual(uint32_t index, |
+ DisplayMode* mode) |
+ : DisplaySnapshot(index, |
+ gfx::Point(0, 0), |
+ 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
|
+ DISPLAY_CONNECTION_TYPE_VIRTUAL, |
+ false, |
+ false, |
+ "Virtual output", |
+ std::vector<const DisplayMode*>(), |
+ NULL, |
+ NULL) { |
+ 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
|
+ mode->refresh_rate())); |
+ |
+ native_mode_ = modes_.front(); |
+} |
+ |
+DisplaySnapshotVirtual::~DisplaySnapshotVirtual() { |
+} |
+ |
+std::string DisplaySnapshotVirtual::ToString() const { |
+ return base::StringPrintf( |
+ "Virtual %s %s", |
+ current_mode_ ? current_mode_->ToString().c_str() : "NULL", |
+ physical_size_.ToString().c_str()); |
+} |
+ |
+} // namespace ui |