Index: ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h |
diff --git a/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h b/ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h |
similarity index 60% |
copy from ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h |
copy to ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h |
index 67230082144e3b38f78895b553ff47d1304649fa..7ff10f2929d3a280b5ac39bd951f52f3f8eb77f5 100644 |
--- a/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h |
+++ b/ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h |
@@ -2,10 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
-#define UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
+#ifndef UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
+#define UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
-#include "base/memory/scoped_ptr.h" |
+#include "base/macros.h" |
#include "base/memory/scoped_vector.h" |
#include "base/observer_list.h" |
#include "ui/display/types/chromeos/native_display_delegate.h" |
@@ -14,18 +14,16 @@ |
namespace ui { |
class DeviceManager; |
-class DisplaySnapshotDri; |
-class DriConsoleBuffer; |
-class DriWrapper; |
-class ScreenManager; |
+class GpuPlatformSupportHostGbm; |
-class NativeDisplayDelegateDri |
+class NativeDisplayDelegateProxy |
: public NativeDisplayDelegate, DeviceEventObserver { |
public: |
- NativeDisplayDelegateDri(DriWrapper* dri, |
- ScreenManager* screen_manager, |
- DeviceManager* device_manager); |
- virtual ~NativeDisplayDelegateDri(); |
+ NativeDisplayDelegateProxy(GpuPlatformSupportHostGbm* proxy, |
+ DeviceManager* device_manager); |
+ virtual ~NativeDisplayDelegateProxy(); |
+ |
+ void OnUpdateNativeDisplays(ScopedVector<DisplaySnapshot> displays); |
// NativeDisplayDelegate overrides: |
virtual void Initialize() OVERRIDE; |
@@ -45,12 +43,12 @@ class NativeDisplayDelegateDri |
HDCPState* state) OVERRIDE; |
virtual bool SetHDCPState(const DisplaySnapshot& output, |
HDCPState state) OVERRIDE; |
- virtual std::vector<ui::ColorCalibrationProfile> |
+ virtual std::vector<ColorCalibrationProfile> |
GetAvailableColorCalibrationProfiles( |
- const ui::DisplaySnapshot& output) OVERRIDE; |
+ const DisplaySnapshot& output) OVERRIDE; |
virtual bool SetColorCalibrationProfile( |
- const ui::DisplaySnapshot& output, |
- ui::ColorCalibrationProfile new_profile) OVERRIDE; |
+ const DisplaySnapshot& output, |
+ ColorCalibrationProfile new_profile) OVERRIDE; |
virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE; |
virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE; |
@@ -58,23 +56,14 @@ class NativeDisplayDelegateDri |
virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; |
private: |
- // Notify ScreenManager of all the displays that were present before the |
- // update but are gone after the update. |
- void NotifyScreenManager( |
- const std::vector<DisplaySnapshotDri*>& new_displays, |
- const std::vector<DisplaySnapshotDri*>& old_displays) const; |
- |
- DriWrapper* dri_; // Not owned. |
- ScreenManager* screen_manager_; // Not owned. |
+ GpuPlatformSupportHostGbm* proxy_; // Not owned. |
DeviceManager* device_manager_; // Not owned. |
- scoped_ptr<DriConsoleBuffer> console_buffer_; |
- ScopedVector<const DisplayMode> cached_modes_; |
- ScopedVector<DisplaySnapshotDri> cached_displays_; |
+ ScopedVector<DisplaySnapshot> displays_; |
ObserverList<NativeDisplayObserver> observers_; |
- DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); |
+ DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy); |
}; |
} // namespace ui |
-#endif // UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
+#endif // UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |