| 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" | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 26                            ScreenManager* screen_manager, | 26                            ScreenManager* screen_manager, | 
| 27                            DeviceManager* device_manager); | 27                            DeviceManager* device_manager); | 
| 28   virtual ~NativeDisplayDelegateDri(); | 28   virtual ~NativeDisplayDelegateDri(); | 
| 29 | 29 | 
| 30   DisplaySnapshot* FindDisplaySnapshot(int64_t id); | 30   DisplaySnapshot* FindDisplaySnapshot(int64_t id); | 
| 31   const DisplayMode* FindDisplayMode(const gfx::Size& size, | 31   const DisplayMode* FindDisplayMode(const gfx::Size& size, | 
| 32                                      bool is_interlaced, | 32                                      bool is_interlaced, | 
| 33                                      float refresh_rate); | 33                                      float refresh_rate); | 
| 34 | 34 | 
| 35   // NativeDisplayDelegate overrides: | 35   // NativeDisplayDelegate overrides: | 
| 36   virtual void Initialize() OVERRIDE; | 36   virtual void Initialize() override; | 
| 37   virtual void GrabServer() OVERRIDE; | 37   virtual void GrabServer() override; | 
| 38   virtual void UngrabServer() OVERRIDE; | 38   virtual void UngrabServer() override; | 
| 39   virtual void SyncWithServer() OVERRIDE; | 39   virtual void SyncWithServer() override; | 
| 40   virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE; | 40   virtual void SetBackgroundColor(uint32_t color_argb) override; | 
| 41   virtual void ForceDPMSOn() OVERRIDE; | 41   virtual void ForceDPMSOn() override; | 
| 42   virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE; | 42   virtual std::vector<DisplaySnapshot*> GetDisplays() override; | 
| 43   virtual void AddMode(const DisplaySnapshot& output, | 43   virtual void AddMode(const DisplaySnapshot& output, | 
| 44                        const DisplayMode* mode) OVERRIDE; | 44                        const DisplayMode* mode) override; | 
| 45   virtual bool Configure(const DisplaySnapshot& output, | 45   virtual bool Configure(const DisplaySnapshot& output, | 
| 46                          const DisplayMode* mode, | 46                          const DisplayMode* mode, | 
| 47                          const gfx::Point& origin) OVERRIDE; | 47                          const gfx::Point& origin) override; | 
| 48   virtual void CreateFrameBuffer(const gfx::Size& size) OVERRIDE; | 48   virtual void CreateFrameBuffer(const gfx::Size& size) override; | 
| 49   virtual bool GetHDCPState(const DisplaySnapshot& output, | 49   virtual bool GetHDCPState(const DisplaySnapshot& output, | 
| 50                             HDCPState* state) OVERRIDE; | 50                             HDCPState* state) override; | 
| 51   virtual bool SetHDCPState(const DisplaySnapshot& output, | 51   virtual bool SetHDCPState(const DisplaySnapshot& output, | 
| 52                             HDCPState state) OVERRIDE; | 52                             HDCPState state) override; | 
| 53   virtual std::vector<ui::ColorCalibrationProfile> | 53   virtual std::vector<ui::ColorCalibrationProfile> | 
| 54       GetAvailableColorCalibrationProfiles( | 54       GetAvailableColorCalibrationProfiles( | 
| 55           const ui::DisplaySnapshot& output) OVERRIDE; | 55           const ui::DisplaySnapshot& output) override; | 
| 56   virtual bool SetColorCalibrationProfile( | 56   virtual bool SetColorCalibrationProfile( | 
| 57       const ui::DisplaySnapshot& output, | 57       const ui::DisplaySnapshot& output, | 
| 58       ui::ColorCalibrationProfile new_profile) OVERRIDE; | 58       ui::ColorCalibrationProfile new_profile) override; | 
| 59   virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE; | 59   virtual void AddObserver(NativeDisplayObserver* observer) override; | 
| 60   virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE; | 60   virtual void RemoveObserver(NativeDisplayObserver* observer) override; | 
| 61 | 61 | 
| 62   // DeviceEventObserver overrides: | 62   // DeviceEventObserver overrides: | 
| 63   virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; | 63   virtual void OnDeviceEvent(const DeviceEvent& event) override; | 
| 64 | 64 | 
| 65  private: | 65  private: | 
| 66   // Notify ScreenManager of all the displays that were present before the | 66   // Notify ScreenManager of all the displays that were present before the | 
| 67   // update but are gone after the update. | 67   // update but are gone after the update. | 
| 68   void NotifyScreenManager( | 68   void NotifyScreenManager( | 
| 69       const std::vector<DisplaySnapshotDri*>& new_displays, | 69       const std::vector<DisplaySnapshotDri*>& new_displays, | 
| 70       const std::vector<DisplaySnapshotDri*>& old_displays) const; | 70       const std::vector<DisplaySnapshotDri*>& old_displays) const; | 
| 71 | 71 | 
| 72   DriWrapper* dri_;                // Not owned. | 72   DriWrapper* dri_;                // Not owned. | 
| 73   ScreenManager* screen_manager_;  // Not owned. | 73   ScreenManager* screen_manager_;  // Not owned. | 
| 74   DeviceManager* device_manager_;  // Not owned. | 74   DeviceManager* device_manager_;  // Not owned. | 
| 75   scoped_ptr<DriConsoleBuffer> console_buffer_; | 75   scoped_ptr<DriConsoleBuffer> console_buffer_; | 
| 76   // Modes can be shared between different displays, so we need to keep track | 76   // Modes can be shared between different displays, so we need to keep track | 
| 77   // of them independently for cleanup. | 77   // of them independently for cleanup. | 
| 78   ScopedVector<const DisplayMode> cached_modes_; | 78   ScopedVector<const DisplayMode> cached_modes_; | 
| 79   ScopedVector<DisplaySnapshotDri> cached_displays_; | 79   ScopedVector<DisplaySnapshotDri> cached_displays_; | 
| 80   ObserverList<NativeDisplayObserver> observers_; | 80   ObserverList<NativeDisplayObserver> observers_; | 
| 81 | 81 | 
| 82   DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); | 82   DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); | 
| 83 }; | 83 }; | 
| 84 | 84 | 
| 85 }  // namespace ui | 85 }  // namespace ui | 
| 86 | 86 | 
| 87 #endif  // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 87 #endif  // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 
| OLD | NEW | 
|---|