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/ozone/common/native_display_delegate_ozone.h"
7 #include "base/logging.h"
8 #include "ui/ozone/common/display_snapshot_proxy.h"
9 #include "ui/ozone/common/display_util.h"
13 NativeDisplayDelegateOzone::NativeDisplayDelegateOzone() {
16 NativeDisplayDelegateOzone::~NativeDisplayDelegateOzone() {
19 void NativeDisplayDelegateOzone::Initialize() {
20 DisplaySnapshot_Params params
;
21 if (CreateSnapshotFromCommandLine(¶ms
)) {
22 DCHECK_NE(DISPLAY_CONNECTION_TYPE_NONE
, params
.type
);
23 displays_
.push_back(new DisplaySnapshotProxy(params
));
27 void NativeDisplayDelegateOzone::GrabServer() {
31 void NativeDisplayDelegateOzone::UngrabServer() {
35 bool NativeDisplayDelegateOzone::TakeDisplayControl() {
40 bool NativeDisplayDelegateOzone::RelinquishDisplayControl() {
45 void NativeDisplayDelegateOzone::SyncWithServer() {
49 void NativeDisplayDelegateOzone::SetBackgroundColor(uint32_t color_argb
) {
53 void NativeDisplayDelegateOzone::ForceDPMSOn() {
57 void NativeDisplayDelegateOzone::GetDisplays(
58 const GetDisplaysCallback
& callback
) {
59 callback
.Run(displays_
.get());
62 void NativeDisplayDelegateOzone::AddMode(const ui::DisplaySnapshot
& output
,
63 const ui::DisplayMode
* mode
) {
67 void NativeDisplayDelegateOzone::Configure(const ui::DisplaySnapshot
& output
,
68 const ui::DisplayMode
* mode
,
69 const gfx::Point
& origin
,
70 const ConfigureCallback
& callback
) {
75 void NativeDisplayDelegateOzone::CreateFrameBuffer(const gfx::Size
& size
) {
79 void NativeDisplayDelegateOzone::GetHDCPState(
80 const ui::DisplaySnapshot
& output
,
81 const GetHDCPStateCallback
& callback
) {
83 callback
.Run(false, HDCP_STATE_UNDESIRED
);
86 void NativeDisplayDelegateOzone::SetHDCPState(
87 const ui::DisplaySnapshot
& output
,
89 const SetHDCPStateCallback
& callback
) {
94 std::vector
<ui::ColorCalibrationProfile
>
95 NativeDisplayDelegateOzone::GetAvailableColorCalibrationProfiles(
96 const ui::DisplaySnapshot
& output
) {
98 return std::vector
<ui::ColorCalibrationProfile
>();
101 bool NativeDisplayDelegateOzone::SetColorCalibrationProfile(
102 const ui::DisplaySnapshot
& output
,
103 ui::ColorCalibrationProfile new_profile
) {
108 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver
* observer
) {
112 void NativeDisplayDelegateOzone::RemoveObserver(
113 NativeDisplayObserver
* observer
) {