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

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

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address oshima@ feedback Created 5 years 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 <inttypes.h>
8
9 #include "base/strings/stringprintf.h"
10 #include "ui/display/types/display_mode.h"
11
12 namespace ui {
13 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id,
14 const gfx::Size& display_size)
15 : DisplaySnapshot(display_id,
16 gfx::Point(0, 0),
17 gfx::Size(510, 290),
18 DISPLAY_CONNECTION_TYPE_VIRTUAL,
19 false,
20 false,
21 "Virtual display",
22 std::vector<const DisplayMode*>(),
23 nullptr,
24 nullptr) {
25 mode_.reset(new DisplayMode(display_size, false, 30));
26 modes_.push_back(mode_.get());
27
28 native_mode_ = modes_.front();
29 }
30
31 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {}
32
33 std::string DisplaySnapshotVirtual::ToString() const {
34 return base::StringPrintf(
35 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_,
36 current_mode_ ? current_mode_->ToString().c_str() : "nullptr",
37 physical_size_.ToString().c_str());
38 }
39
40 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698