Chromium Code Reviews| 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..843944200f82362d5ef0c51e42b29cd661694590 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 that is owned by caller. |
|
sky
2016/09/08 18:03:35
'caller' -> 'the caller'.
optional: that this ret
kylechar
2016/09/08 18:12:03
Done.
|
| 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 |