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

Unified Diff: ui/display/types/native_display_delegate.h

Issue 2324163002: Add FakeDisplayDelegate for off device usage. (Closed)
Patch Set: Fix windows compile problems. Created 4 years, 3 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
« no previous file with comments | « ui/display/types/fake_display_controller.h ('k') | ui/display/types/native_display_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/types/native_display_delegate.h
diff --git a/ui/display/types/native_display_delegate.h b/ui/display/types/native_display_delegate.h
index b17be8f1cffda92a19ad1e77a6591bd75486a8dc..b96a19512d41386104429d8ab1dd7c2813d54774 100644
--- a/ui/display/types/native_display_delegate.h
+++ b/ui/display/types/native_display_delegate.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "ui/display/types/display_constants.h"
#include "ui/display/types/display_types_export.h"
+#include "ui/display/types/fake_display_controller.h"
namespace gfx {
class Point;
@@ -21,17 +22,16 @@ class Size;
namespace ui {
class DisplayMode;
class DisplaySnapshot;
-
class NativeDisplayObserver;
struct GammaRampRGBEntry;
-typedef base::Callback<void(const std::vector<ui::DisplaySnapshot*>&)>
- GetDisplaysCallback;
-typedef base::Callback<void(bool)> ConfigureCallback;
-typedef base::Callback<void(bool, ui::HDCPState)> GetHDCPStateCallback;
-typedef base::Callback<void(bool)> SetHDCPStateCallback;
-typedef base::Callback<void(bool)> DisplayControlCallback;
+using GetDisplaysCallback =
+ base::Callback<void(const std::vector<ui::DisplaySnapshot*>&)>;
+using ConfigureCallback = base::Callback<void(bool)>;
+using GetHDCPStateCallback = base::Callback<void(bool, ui::HDCPState)>;
+using SetHDCPStateCallback = base::Callback<void(bool)>;
+using DisplayControlCallback = base::Callback<void(bool)>;
// Interface for classes that perform display configuration actions on behalf
// of DisplayConfigurator.
@@ -41,7 +41,7 @@ typedef base::Callback<void(bool)> DisplayControlCallback;
// callbacks are always called.
class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
public:
- virtual ~NativeDisplayDelegate() {}
+ virtual ~NativeDisplayDelegate();
virtual void Initialize() = 0;
@@ -117,6 +117,11 @@ class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
virtual void AddObserver(NativeDisplayObserver* observer) = 0;
virtual void RemoveObserver(NativeDisplayObserver* observer) = 0;
+
+ // Returns a fake display controller that can modify the fake display state.
+ // Will return null if not needed, most likely because the delegate is
+ // intended for use on device and doesn't need to fake the display state.
+ virtual display::FakeDisplayController* GetFakeDisplayController() = 0;
};
} // namespace ui
« no previous file with comments | « ui/display/types/fake_display_controller.h ('k') | ui/display/types/native_display_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698