EME test page application.
[chromium-blink-merge.git] / ui / display / chromeos / x11 / display_snapshot_x11.cc
blob52c4ba78b60dd731b7a9d72dca336b9693eeada1
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.
5 #include "ui/display/chromeos/x11/display_snapshot_x11.h"
7 #include "base/strings/stringprintf.h"
8 #include "ui/display/chromeos/x11/display_mode_x11.h"
10 namespace ui {
12 DisplaySnapshotX11::DisplaySnapshotX11(
13 int64_t display_id,
14 bool has_proper_display_id,
15 const gfx::Point& origin,
16 const gfx::Size& physical_size,
17 DisplayConnectionType type,
18 bool is_aspect_preserving_scaling,
19 bool has_overscan,
20 std::string display_name,
21 const std::vector<const DisplayMode*>& modes,
22 const DisplayMode* current_mode,
23 const DisplayMode* native_mode,
24 RROutput output,
25 RRCrtc crtc,
26 int index)
27 : DisplaySnapshot(display_id,
28 has_proper_display_id,
29 origin,
30 physical_size,
31 type,
32 is_aspect_preserving_scaling,
33 has_overscan,
34 display_name,
35 modes,
36 current_mode,
37 native_mode),
38 output_(output),
39 crtc_(crtc),
40 index_(index) {}
42 DisplaySnapshotX11::~DisplaySnapshotX11() {}
44 std::string DisplaySnapshotX11::ToString() const {
45 return base::StringPrintf(
46 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]",
47 type_,
48 output_,
49 crtc_,
50 current_mode_
51 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id()
52 : 0,
53 physical_size_.width(),
54 physical_size_.height());
57 } // namespace ui