Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h

Issue 250793005: Refactor Udev device support in Ozone and add a DRM hotplug monitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h
diff --git a/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h b/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h
index db5b5eb2b7328c9ac2a6ac6540fe7d3fb31603e6..a2a0888747eab8cecc68853f37e39dd8ebbbc020 100644
--- a/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h
+++ b/ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h
@@ -5,18 +5,21 @@
#ifndef UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_
#define UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_
+#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/observer_list.h"
#include "ui/display/types/chromeos/native_display_delegate.h"
namespace ui {
+class DisplayEventListener;
class DisplaySnapshotDri;
class DriSurfaceFactory;
class NativeDisplayDelegateDri : public NativeDisplayDelegate {
public:
- NativeDisplayDelegateDri(DriSurfaceFactory* surface_factory);
+ NativeDisplayDelegateDri(DriSurfaceFactory* surface_factory,
+ scoped_ptr<DisplayEventListener> display_listener_);
virtual ~NativeDisplayDelegateDri();
// NativeDisplayDelegate overrides:
@@ -47,7 +50,11 @@ class NativeDisplayDelegateDri : public NativeDisplayDelegate {
virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
private:
+ // Callback for display events.
+ void OnDisplayEvent();
+
DriSurfaceFactory* surface_factory_; // Not owned.
+ scoped_ptr<DisplayEventListener> display_event_listener_;
ScopedVector<const DisplayMode> cached_modes_;
ScopedVector<DisplaySnapshotDri> cached_displays_;
ObserverList<NativeDisplayObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698