| 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_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
| 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Returns the list of current outputs. This is used to discard duplicate | 60 // Returns the list of current outputs. This is used to discard duplicate |
| 61 // events. | 61 // events. |
| 62 virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const = 0; | 62 virtual const std::vector<DisplaySnapshot*>& GetCachedDisplays() const = 0; |
| 63 | 63 |
| 64 // Notify |observers_| that a change in configuration has occurred. | 64 // Notify |observers_| that a change in configuration has occurred. |
| 65 virtual void NotifyDisplayObservers() = 0; | 65 virtual void NotifyDisplayObservers() = 0; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 NativeDisplayDelegateX11(); | 68 NativeDisplayDelegateX11(); |
| 69 virtual ~NativeDisplayDelegateX11(); | 69 ~NativeDisplayDelegateX11() override; |
| 70 | 70 |
| 71 // NativeDisplayDelegate overrides: | 71 // NativeDisplayDelegate overrides: |
| 72 virtual void Initialize() override; | 72 void Initialize() override; |
| 73 virtual void GrabServer() override; | 73 void GrabServer() override; |
| 74 virtual void UngrabServer() override; | 74 void UngrabServer() override; |
| 75 virtual bool TakeDisplayControl() override; | 75 bool TakeDisplayControl() override; |
| 76 virtual bool RelinquishDisplayControl() override; | 76 bool RelinquishDisplayControl() override; |
| 77 virtual void SyncWithServer() override; | 77 void SyncWithServer() override; |
| 78 virtual void SetBackgroundColor(uint32_t color_argb) override; | 78 void SetBackgroundColor(uint32_t color_argb) override; |
| 79 virtual void ForceDPMSOn() override; | 79 void ForceDPMSOn() override; |
| 80 virtual void GetDisplays(const GetDisplaysCallback& callback) override; | 80 void GetDisplays(const GetDisplaysCallback& callback) override; |
| 81 virtual void AddMode(const DisplaySnapshot& output, | 81 void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override; |
| 82 const DisplayMode* mode) override; | 82 void Configure(const DisplaySnapshot& output, |
| 83 virtual void Configure(const DisplaySnapshot& output, | 83 const DisplayMode* mode, |
| 84 const DisplayMode* mode, | 84 const gfx::Point& origin, |
| 85 const gfx::Point& origin, | 85 const ConfigureCallback& callback) override; |
| 86 const ConfigureCallback& callback) override; | 86 void CreateFrameBuffer(const gfx::Size& size) override; |
| 87 virtual void CreateFrameBuffer(const gfx::Size& size) override; | 87 bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override; |
| 88 virtual bool GetHDCPState(const DisplaySnapshot& output, | 88 bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override; |
| 89 HDCPState* state) override; | 89 std::vector<ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( |
| 90 virtual bool SetHDCPState(const DisplaySnapshot& output, | 90 const DisplaySnapshot& output) override; |
| 91 HDCPState state) override; | 91 bool SetColorCalibrationProfile(const DisplaySnapshot& output, |
| 92 virtual std::vector<ColorCalibrationProfile> | 92 ColorCalibrationProfile new_profile) override; |
| 93 GetAvailableColorCalibrationProfiles( | 93 void AddObserver(NativeDisplayObserver* observer) override; |
| 94 const DisplaySnapshot& output) override; | 94 void RemoveObserver(NativeDisplayObserver* observer) override; |
| 95 virtual bool SetColorCalibrationProfile( | |
| 96 const DisplaySnapshot& output, | |
| 97 ColorCalibrationProfile new_profile) override; | |
| 98 virtual void AddObserver(NativeDisplayObserver* observer) override; | |
| 99 virtual void RemoveObserver(NativeDisplayObserver* observer) override; | |
| 100 | 95 |
| 101 private: | 96 private: |
| 102 class HelperDelegateX11; | 97 class HelperDelegateX11; |
| 103 | 98 |
| 104 // Parses all the modes made available by |screen_|. | 99 // Parses all the modes made available by |screen_|. |
| 105 void InitModes(); | 100 void InitModes(); |
| 106 | 101 |
| 107 // Helper method for GetOutputs() that returns an OutputSnapshot struct based | 102 // Helper method for GetOutputs() that returns an OutputSnapshot struct based |
| 108 // on the passed-in information. | 103 // on the passed-in information. |
| 109 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id, | 104 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 152 |
| 158 // A background color used during boot time + multi displays. | 153 // A background color used during boot time + multi displays. |
| 159 uint32_t background_color_argb_; | 154 uint32_t background_color_argb_; |
| 160 | 155 |
| 161 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); | 156 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); |
| 162 }; | 157 }; |
| 163 | 158 |
| 164 } // namespace ui | 159 } // namespace ui |
| 165 | 160 |
| 166 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 161 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
| OLD | NEW |