Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: ui/display/chromeos/display_snapshot_virtual.cc

Issue 615133002: Add support for a virtual display on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698