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
= CreateSnapshotFromCommandLine();
21 if (params
.type
!= DISPLAY_CONNECTION_TYPE_NONE
)
22 displays_
.push_back(new DisplaySnapshotProxy(params
));
25 void NativeDisplayDelegateOzone::GrabServer() {
29 void NativeDisplayDelegateOzone::UngrabServer() {
33 bool NativeDisplayDelegateOzone::TakeDisplayControl() {
38 bool NativeDisplayDelegateOzone::RelinquishDisplayControl() {
43 void NativeDisplayDelegateOzone::SyncWithServer() {
47 void NativeDisplayDelegateOzone::SetBackgroundColor(uint32_t color_argb
) {
51 void NativeDisplayDelegateOzone::ForceDPMSOn() {
55 void NativeDisplayDelegateOzone::GetDisplays(
56 const GetDisplaysCallback
& callback
) {
57 callback
.Run(displays_
.get());
60 void NativeDisplayDelegateOzone::AddMode(const ui::DisplaySnapshot
& output
,
61 const ui::DisplayMode
* mode
) {
65 void NativeDisplayDelegateOzone::Configure(const ui::DisplaySnapshot
& output
,
66 const ui::DisplayMode
* mode
,
67 const gfx::Point
& origin
,
68 const ConfigureCallback
& callback
) {
73 void NativeDisplayDelegateOzone::CreateFrameBuffer(const gfx::Size
& size
) {
77 bool NativeDisplayDelegateOzone::GetHDCPState(const ui::DisplaySnapshot
& output
,
78 ui::HDCPState
* state
) {
83 bool NativeDisplayDelegateOzone::SetHDCPState(const ui::DisplaySnapshot
& output
,
84 ui::HDCPState state
) {
89 std::vector
<ui::ColorCalibrationProfile
>
90 NativeDisplayDelegateOzone::GetAvailableColorCalibrationProfiles(
91 const ui::DisplaySnapshot
& output
) {
93 return std::vector
<ui::ColorCalibrationProfile
>();
96 bool NativeDisplayDelegateOzone::SetColorCalibrationProfile(
97 const ui::DisplaySnapshot
& output
,
98 ui::ColorCalibrationProfile new_profile
) {
103 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver
* observer
) {
107 void NativeDisplayDelegateOzone::RemoveObserver(
108 NativeDisplayObserver
* observer
) {