blob: 9127fd22bf0ef0563d0eb510fd7032a5fddf29e6 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
#define UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
#include <stdint.h>
#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "ui/display/types/native_display_delegate.h"
namespace ui {
class NativeDisplayDelegateOzone : public NativeDisplayDelegate {
public:
NativeDisplayDelegateOzone();
~NativeDisplayDelegateOzone() override;
// NativeDisplayDelegate overrides:
void Initialize() override;
void GrabServer() override;
void UngrabServer() override;
void TakeDisplayControl(const DisplayControlCallback& callback) override;
void RelinquishDisplayControl(
const DisplayControlCallback& callback) override;
void SyncWithServer() override;
void SetBackgroundColor(uint32_t color_argb) override;
void ForceDPMSOn() override;
void GetDisplays(const GetDisplaysCallback& callback) override;
void AddMode(const ui::DisplaySnapshot& output,
const ui::DisplayMode* mode) override;
void Configure(const ui::DisplaySnapshot& output,
const ui::DisplayMode* mode,
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
void GetHDCPState(const ui::DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const ui::DisplaySnapshot& output,
ui::HDCPState state,
const SetHDCPStateCallback& callback) override;
std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
const ui::DisplaySnapshot& output) override;
bool SetColorCalibrationProfile(
const ui::DisplaySnapshot& output,
ui::ColorCalibrationProfile new_profile) override;
bool SetColorCorrection(const ui::DisplaySnapshot& output,
const std::vector<GammaRampRGBEntry>& degamma_lut,
const std::vector<GammaRampRGBEntry>& gamma_lut,
const std::vector<float>& correction_matrix) override;
void AddObserver(NativeDisplayObserver* observer) override;
void RemoveObserver(NativeDisplayObserver* observer) override;
display::FakeDisplayController* GetFakeDisplayController() override;
private:
std::vector<std::unique_ptr<DisplaySnapshot>> displays_;
DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateOzone);
};
} // namespace ui
#endif // UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_