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 void NativeDisplayDelegateOzone::TakeDisplayControl(
36 const DisplayControlCallback
& callback
) {
41 void NativeDisplayDelegateOzone::RelinquishDisplayControl(
42 const DisplayControlCallback
& callback
) {
47 void NativeDisplayDelegateOzone::SyncWithServer() {
51 void NativeDisplayDelegateOzone::SetBackgroundColor(uint32_t color_argb
) {
55 void NativeDisplayDelegateOzone::ForceDPMSOn() {
59 void NativeDisplayDelegateOzone::GetDisplays(
60 const GetDisplaysCallback
& callback
) {
61 callback
.Run(displays_
.get());
64 void NativeDisplayDelegateOzone::AddMode(const ui::DisplaySnapshot
& output
,
65 const ui::DisplayMode
* mode
) {
69 void NativeDisplayDelegateOzone::Configure(const ui::DisplaySnapshot
& output
,
70 const ui::DisplayMode
* mode
,
71 const gfx::Point
& origin
,
72 const ConfigureCallback
& callback
) {
77 void NativeDisplayDelegateOzone::CreateFrameBuffer(const gfx::Size
& size
) {
81 void NativeDisplayDelegateOzone::GetHDCPState(
82 const ui::DisplaySnapshot
& output
,
83 const GetHDCPStateCallback
& callback
) {
85 callback
.Run(false, HDCP_STATE_UNDESIRED
);
88 void NativeDisplayDelegateOzone::SetHDCPState(
89 const ui::DisplaySnapshot
& output
,
91 const SetHDCPStateCallback
& callback
) {
96 std::vector
<ui::ColorCalibrationProfile
>
97 NativeDisplayDelegateOzone::GetAvailableColorCalibrationProfiles(
98 const ui::DisplaySnapshot
& output
) {
100 return std::vector
<ui::ColorCalibrationProfile
>();
103 bool NativeDisplayDelegateOzone::SetColorCalibrationProfile(
104 const ui::DisplaySnapshot
& output
,
105 ui::ColorCalibrationProfile new_profile
) {
110 bool NativeDisplayDelegateOzone::SetGammaRamp(
111 const ui::DisplaySnapshot
& output
,
112 const std::vector
<GammaRampRGBEntry
>& lut
) {
117 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver
* observer
) {
121 void NativeDisplayDelegateOzone::RemoveObserver(
122 NativeDisplayObserver
* observer
) {