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

Side by Side Diff: services/ui/display/platform_screen.h

Issue 2323393003: Connect mojom::DisplayController from ash to ui. (Closed)
Patch Set: Add comments. 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 unified diff | Download patch
« no previous file with comments | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "services/ui/display/platform_screen_delegate.h" 11 #include "services/ui/display/platform_screen_delegate.h"
12 12
13 namespace shell {
14 class InterfaceRegistry;
15 }
16
13 namespace display { 17 namespace display {
14 18
15 // PlatformScreen provides the necessary functionality to configure all 19 // PlatformScreen provides the necessary functionality to configure all
16 // attached physical displays. 20 // attached physical displays.
17 class PlatformScreen { 21 class PlatformScreen {
18 public: 22 public:
19 PlatformScreen(); 23 PlatformScreen();
20 virtual ~PlatformScreen(); 24 virtual ~PlatformScreen();
21 25
22 // Creates a singleton PlatformScreen instance. 26 // Creates a singleton PlatformScreen instance.
23 static std::unique_ptr<PlatformScreen> Create(); 27 static std::unique_ptr<PlatformScreen> Create();
24 static PlatformScreen* GetInstance(); 28 static PlatformScreen* GetInstance();
25 29
30 // Registers Mojo interfaces provided.
31 virtual void AddInterfaces(shell::InterfaceRegistry* registry) = 0;
32
26 // Triggers initial display configuration to start. On device this will 33 // Triggers initial display configuration to start. On device this will
27 // configuration the connected displays. Off device this will create one or 34 // configuration the connected displays. Off device this will create one or
28 // more fake displays and pretend to configure them. A non-null |delegate| 35 // more fake displays and pretend to configure them. A non-null |delegate|
29 // must be provided that will receive notifications when displays are added, 36 // must be provided that will receive notifications when displays are added,
30 // removed or modified. 37 // removed or modified.
31 virtual void Init(PlatformScreenDelegate* delegate) = 0; 38 virtual void Init(PlatformScreenDelegate* delegate) = 0;
32 39
33 virtual int64_t GetPrimaryDisplayId() const = 0; 40 virtual int64_t GetPrimaryDisplayId() const = 0;
34 41
35 private: 42 private:
36 static PlatformScreen* instance_; // Instance is not owned. 43 static PlatformScreen* instance_; // Instance is not owned.
37 44
38 DISALLOW_COPY_AND_ASSIGN(PlatformScreen); 45 DISALLOW_COPY_AND_ASSIGN(PlatformScreen);
39 }; 46 };
40 47
41 } // namespace display 48 } // namespace display
42 49
43 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_ 50 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
OLDNEW
« no previous file with comments | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698