| 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 57%
|
| 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..19e5ff7afb517298303551f048a2838bc10bd276 100644
|
| --- a/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h
|
| +++ b/ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h
|
| @@ -2,30 +2,30 @@
|
| // 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"
|
| #include "ui/events/ozone/device/device_event_observer.h"
|
| +#include "ui/ozone/public/gpu_platform_support_host.h"
|
|
|
| namespace ui {
|
|
|
| class DeviceManager;
|
| -class DisplaySnapshotDri;
|
| -class DriConsoleBuffer;
|
| -class DriWrapper;
|
| -class ScreenManager;
|
| +class GpuPlatformSupportHostGbm;
|
|
|
| -class NativeDisplayDelegateDri
|
| - : public NativeDisplayDelegate, DeviceEventObserver {
|
| +struct DisplaySnapshot_Params;
|
| +
|
| +class NativeDisplayDelegateProxy : public NativeDisplayDelegate,
|
| + public DeviceEventObserver,
|
| + public GpuPlatformSupportHost {
|
| public:
|
| - NativeDisplayDelegateDri(DriWrapper* dri,
|
| - ScreenManager* screen_manager,
|
| - DeviceManager* device_manager);
|
| - virtual ~NativeDisplayDelegateDri();
|
| + NativeDisplayDelegateProxy(GpuPlatformSupportHostGbm* proxy,
|
| + DeviceManager* device_manager);
|
| + virtual ~NativeDisplayDelegateProxy();
|
|
|
| // NativeDisplayDelegate overrides:
|
| virtual void Initialize() OVERRIDE;
|
| @@ -45,36 +45,37 @@ 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;
|
|
|
| // DeviceEventObserver overrides:
|
| virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE;
|
|
|
| + // GpuPlatformSupportHost:
|
| + virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
|
| + virtual void OnChannelDestroyed(int host_id) OVERRIDE;
|
| +
|
| + // IPC::Listener overrides:
|
| + virtual bool OnMessageReceived(const IPC::Message& message) 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;
|
| + void OnUpdateNativeDisplays(
|
| + const std::vector<DisplaySnapshot_Params>& displays);
|
|
|
| - 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_
|
|
|