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 bool NativeDisplayDelegateOzone::GetHDCPState(const ui::DisplaySnapshot
& output
,
80 ui::HDCPState
* state
) {
85 bool NativeDisplayDelegateOzone::SetHDCPState(const ui::DisplaySnapshot
& output
,
86 ui::HDCPState state
) {
91 std::vector
<ui::ColorCalibrationProfile
>
92 NativeDisplayDelegateOzone::GetAvailableColorCalibrationProfiles(
93 const ui::DisplaySnapshot
& output
) {
95 return std::vector
<ui::ColorCalibrationProfile
>();
98 bool NativeDisplayDelegateOzone::SetColorCalibrationProfile(
99 const ui::DisplaySnapshot
& output
,
100 ui::ColorCalibrationProfile new_profile
) {
105 void NativeDisplayDelegateOzone::AddObserver(NativeDisplayObserver
* observer
) {
109 void NativeDisplayDelegateOzone::RemoveObserver(
110 NativeDisplayObserver
* observer
) {