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

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: Remove ash/ dep from content Created 5 years, 9 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
« no previous file with comments | « ui/display/chromeos/display_snapshot_virtual.h ('k') | ui/display/chromeos/display_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(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
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_snapshot_virtual.h ('k') | ui/display/chromeos/display_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698