| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 6 #define UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "ui/display/types/native_display_delegate.h" | 11 #include "ui/display/types/native_display_delegate.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 class DeviceManager; | 15 class DeviceManager; |
| 16 class DisplaySnapshotDri; | 16 class DisplaySnapshotDri; |
| 17 class DriWrapper; | 17 class DriWrapper; |
| 18 class ScreenManager; | 18 class ScreenManager; |
| 19 | 19 |
| 20 class NativeDisplayDelegateDri : public NativeDisplayDelegate { | 20 class NativeDisplayDelegateDri : public NativeDisplayDelegate { |
| 21 public: | 21 public: |
| 22 NativeDisplayDelegateDri(DriWrapper* dri, ScreenManager* screen_manager); | 22 NativeDisplayDelegateDri(DriWrapper* dri, ScreenManager* screen_manager); |
| 23 ~NativeDisplayDelegateDri() override; | 23 ~NativeDisplayDelegateDri() override; |
| 24 | 24 |
| 25 DisplaySnapshot* FindDisplaySnapshot(int64_t id); | 25 DisplaySnapshot* FindDisplaySnapshot(int64_t id); |
| 26 const DisplayMode* FindDisplayMode(const gfx::Size& size, | 26 const DisplayMode* FindDisplayMode(const gfx::Size& size, |
| 27 bool is_interlaced, | 27 bool is_interlaced, |
| 28 float refresh_rate); | 28 float refresh_rate); |
| 29 | 29 |
| 30 std::vector<DisplaySnapshot*> GetDisplays(); |
| 31 bool Configure(const DisplaySnapshot& output, |
| 32 const DisplayMode* mode, |
| 33 const gfx::Point& origin); |
| 34 |
| 30 // NativeDisplayDelegate overrides: | 35 // NativeDisplayDelegate overrides: |
| 31 void Initialize() override; | 36 void Initialize() override; |
| 32 void GrabServer() override; | 37 void GrabServer() override; |
| 33 void UngrabServer() override; | 38 void UngrabServer() override; |
| 34 bool TakeDisplayControl() override; | 39 bool TakeDisplayControl() override; |
| 35 bool RelinquishDisplayControl() override; | 40 bool RelinquishDisplayControl() override; |
| 36 void SyncWithServer() override; | 41 void SyncWithServer() override; |
| 37 void SetBackgroundColor(uint32_t color_argb) override; | 42 void SetBackgroundColor(uint32_t color_argb) override; |
| 38 void ForceDPMSOn() override; | 43 void ForceDPMSOn() override; |
| 39 std::vector<DisplaySnapshot*> GetDisplays() override; | |
| 40 void GetDisplays(const GetDisplaysCallback& callback) override; | 44 void GetDisplays(const GetDisplaysCallback& callback) override; |
| 41 void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override; | 45 void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override; |
| 42 bool Configure(const DisplaySnapshot& output, | |
| 43 const DisplayMode* mode, | |
| 44 const gfx::Point& origin) override; | |
| 45 void Configure(const DisplaySnapshot& output, | 46 void Configure(const DisplaySnapshot& output, |
| 46 const DisplayMode* mode, | 47 const DisplayMode* mode, |
| 47 const gfx::Point& origin, | 48 const gfx::Point& origin, |
| 48 const ConfigureCallback& callback) override; | 49 const ConfigureCallback& callback) override; |
| 49 void CreateFrameBuffer(const gfx::Size& size) override; | 50 void CreateFrameBuffer(const gfx::Size& size) override; |
| 50 bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override; | 51 bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override; |
| 51 bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override; | 52 bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override; |
| 52 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( | 53 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( |
| 53 const ui::DisplaySnapshot& output) override; | 54 const ui::DisplaySnapshot& output) override; |
| 54 bool SetColorCalibrationProfile( | 55 bool SetColorCalibrationProfile( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 71 ScopedVector<const DisplayMode> cached_modes_; | 72 ScopedVector<const DisplayMode> cached_modes_; |
| 72 ScopedVector<DisplaySnapshotDri> cached_displays_; | 73 ScopedVector<DisplaySnapshotDri> cached_displays_; |
| 73 ObserverList<NativeDisplayObserver> observers_; | 74 ObserverList<NativeDisplayObserver> observers_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); | 76 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace ui | 79 } // namespace ui |
| 79 | 80 |
| 80 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 81 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
| OLD | NEW |