Mac: Fix performance issues with remote CoreAnimation
[chromium-blink-merge.git] / ui / ozone / common / native_display_delegate_ozone.h
blob840e4a12fe9bdbea72872bbc4ad0712ad558a8d0
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 #ifndef UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
6 #define UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h"
10 #include "ui/display/types/native_display_delegate.h"
12 namespace ui {
14 class NativeDisplayDelegateOzone : public NativeDisplayDelegate {
15 public:
16 NativeDisplayDelegateOzone();
17 ~NativeDisplayDelegateOzone() override;
19 // NativeDisplayDelegate overrides:
20 void Initialize() override;
21 void GrabServer() override;
22 void UngrabServer() override;
23 bool TakeDisplayControl() override;
24 bool RelinquishDisplayControl() override;
25 void SyncWithServer() override;
26 void SetBackgroundColor(uint32_t color_argb) override;
27 void ForceDPMSOn() override;
28 std::vector<ui::DisplaySnapshot*> GetDisplays() override;
29 void AddMode(const ui::DisplaySnapshot& output,
30 const ui::DisplayMode* mode) override;
31 bool Configure(const ui::DisplaySnapshot& output,
32 const ui::DisplayMode* mode,
33 const gfx::Point& origin) override;
34 void CreateFrameBuffer(const gfx::Size& size) override;
35 bool GetHDCPState(const ui::DisplaySnapshot& output,
36 ui::HDCPState* state) override;
37 bool SetHDCPState(const ui::DisplaySnapshot& output,
38 ui::HDCPState state) override;
39 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
40 const ui::DisplaySnapshot& output) override;
41 bool SetColorCalibrationProfile(
42 const ui::DisplaySnapshot& output,
43 ui::ColorCalibrationProfile new_profile) override;
44 void AddObserver(NativeDisplayObserver* observer) override;
45 void RemoveObserver(NativeDisplayObserver* observer) override;
47 private:
48 ScopedVector<DisplaySnapshot> displays_;
50 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateOzone);
53 } // namespace ui
55 #endif // UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_