Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: ui/ozone/platform/drm/host/drm_native_display_delegate.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "ui/ozone/platform/drm/host/drm_native_display_delegate.h"
6
7 #include "ui/display/types/display_snapshot.h"
8 #include "ui/display/types/native_display_observer.h"
9 #include "ui/ozone/platform/drm/host/drm_display_host.h"
10 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h"
11
12 namespace ui {
13
14 DrmNativeDisplayDelegate::DrmNativeDisplayDelegate(
15 DrmDisplayHostManager* display_manager)
16 : display_manager_(display_manager) {
17 }
18
19 DrmNativeDisplayDelegate::~DrmNativeDisplayDelegate() {
20 display_manager_->RemoveDelegate(this);
21 }
22
23 void DrmNativeDisplayDelegate::OnConfigurationChanged() {
24 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_,
25 OnConfigurationChanged());
26 }
27
28 void DrmNativeDisplayDelegate::Initialize() {
29 display_manager_->AddDelegate(this);
30 }
31
32 void DrmNativeDisplayDelegate::GrabServer() {
33 }
34
35 void DrmNativeDisplayDelegate::UngrabServer() {
36 }
37
38 void DrmNativeDisplayDelegate::TakeDisplayControl(
39 const DisplayControlCallback& callback) {
40 display_manager_->TakeDisplayControl(callback);
41 }
42
43 void DrmNativeDisplayDelegate::RelinquishDisplayControl(
44 const DisplayControlCallback& callback) {
45 display_manager_->RelinquishDisplayControl(callback);
46 }
47
48 void DrmNativeDisplayDelegate::SyncWithServer() {
49 }
50
51 void DrmNativeDisplayDelegate::SetBackgroundColor(uint32_t color_argb) {
52 }
53
54 void DrmNativeDisplayDelegate::ForceDPMSOn() {
55 }
56
57 void DrmNativeDisplayDelegate::GetDisplays(
58 const GetDisplaysCallback& callback) {
59 display_manager_->UpdateDisplays(callback);
60 }
61
62 void DrmNativeDisplayDelegate::AddMode(const ui::DisplaySnapshot& output,
63 const ui::DisplayMode* mode) {
64 }
65
66 void DrmNativeDisplayDelegate::Configure(const ui::DisplaySnapshot& output,
67 const ui::DisplayMode* mode,
68 const gfx::Point& origin,
69 const ConfigureCallback& callback) {
70 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id());
71 display->Configure(mode, origin, callback);
72 }
73
74 void DrmNativeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) {
75 }
76
77 void DrmNativeDisplayDelegate::GetHDCPState(
78 const ui::DisplaySnapshot& output,
79 const GetHDCPStateCallback& callback) {
80 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id());
81 display->GetHDCPState(callback);
82 }
83
84 void DrmNativeDisplayDelegate::SetHDCPState(
85 const ui::DisplaySnapshot& output,
86 ui::HDCPState state,
87 const SetHDCPStateCallback& callback) {
88 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id());
89 display->SetHDCPState(state, callback);
90 }
91
92 std::vector<ui::ColorCalibrationProfile>
93 DrmNativeDisplayDelegate::GetAvailableColorCalibrationProfiles(
94 const ui::DisplaySnapshot& output) {
95 return std::vector<ui::ColorCalibrationProfile>();
96 }
97
98 bool DrmNativeDisplayDelegate::SetColorCalibrationProfile(
99 const ui::DisplaySnapshot& output,
100 ui::ColorCalibrationProfile new_profile) {
101 NOTIMPLEMENTED();
102 return false;
103 }
104
105 bool DrmNativeDisplayDelegate::SetGammaRamp(
106 const ui::DisplaySnapshot& output,
107 const std::vector<GammaRampRGBEntry>& lut) {
108 DrmDisplayHost* display = display_manager_->GetDisplay(output.display_id());
109 display->SetGammaRamp(lut);
110 return true;
111 }
112
113 void DrmNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) {
114 observers_.AddObserver(observer);
115 }
116
117 void DrmNativeDisplayDelegate::RemoveObserver(NativeDisplayObserver* observer) {
118 observers_.RemoveObserver(observer);
119 }
120
121 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_native_display_delegate.h ('k') | ui/ozone/platform/drm/host/drm_overlay_candidates_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698