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

Unified Diff: services/ui/display/platform_screen.h

Issue 2310133002: Add mojom::DisplayController. (Closed)
Patch Set: Add missing dep. 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 | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/display/platform_screen.h
diff --git a/services/ui/display/platform_screen.h b/services/ui/display/platform_screen.h
index b782ee7ce2a7de9d1cbf92cd4391f6b79bddd3fd..262334ed627eb8d1be03ca34e0ef282636ed3e13 100644
--- a/services/ui/display/platform_screen.h
+++ b/services/ui/display/platform_screen.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/macros.h"
#include "services/ui/display/platform_screen_delegate.h"
namespace display {
@@ -15,10 +16,12 @@ namespace display {
// attached physical displays.
class PlatformScreen {
public:
- virtual ~PlatformScreen() {}
+ PlatformScreen();
+ virtual ~PlatformScreen();
- // Creates a PlatformScreen instance.
+ // Creates a singleton PlatformScreen instance.
static std::unique_ptr<PlatformScreen> Create();
+ static PlatformScreen* GetInstance();
// Triggers initial display configuration to start. On device this will
// configuration the connected displays. Off device this will create one or
@@ -28,6 +31,11 @@ class PlatformScreen {
virtual void Init(PlatformScreenDelegate* delegate) = 0;
virtual int64_t GetPrimaryDisplayId() const = 0;
+
+ private:
+ static PlatformScreen* instance_; // Instance is not owned.
+
+ DISALLOW_COPY_AND_ASSIGN(PlatformScreen);
};
} // namespace display
« no previous file with comments | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698