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

Side by Side Diff: ui/display/chromeos/x11/display_snapshot_x11.cc

Issue 187073002: Refactoring display configuration state to allow generic state objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/display/chromeos/x11/display_snapshot_x11.h ('k') | ui/display/chromeos/x11/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/x11/display_snapshot_x11.h"
6
7 #include "base/strings/stringprintf.h"
8 #include "ui/display/chromeos/x11/display_mode_x11.h"
9 #include "ui/display/chromeos/x11/display_util.h"
10
11 namespace ui {
12
13 DisplaySnapshotX11::DisplaySnapshotX11(
14 int64_t display_id,
15 bool has_proper_display_id,
16 const gfx::Point& origin,
17 const gfx::Size& physical_size,
18 OutputType type,
19 bool is_aspect_preserving_scaling,
20 const std::vector<const DisplayMode*>& modes,
21 const DisplayMode* current_mode,
22 const DisplayMode* native_mode,
23 RROutput output,
24 RRCrtc crtc,
25 int index)
26 : DisplaySnapshot(display_id,
27 has_proper_display_id,
28 origin,
29 physical_size,
30 type,
31 is_aspect_preserving_scaling,
32 modes,
33 current_mode,
34 native_mode),
35 output_(output),
36 crtc_(crtc),
37 index_(index) {}
38
39 DisplaySnapshotX11::~DisplaySnapshotX11() {}
40
41 std::string DisplaySnapshotX11::GetDisplayName() {
42 return ui::GetDisplayName(output_);
43 }
44
45 bool DisplaySnapshotX11::GetOverscanFlag() {
46 bool flag = false;
47 GetOutputOverscanFlag(output_, &flag);
48
49 return flag;
50 }
51
52 std::string DisplaySnapshotX11::ToString() const {
53 return base::StringPrintf(
54 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]",
55 type_,
56 output_,
57 crtc_,
58 current_mode_
59 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id()
60 : 0,
61 physical_size_.width(),
62 physical_size_.height());
63 }
64
65 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/x11/display_snapshot_x11.h ('k') | ui/display/chromeos/x11/display_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698