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

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

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes for comments. Created 4 years, 4 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_delegate.h » ('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 4c3aa456b3ea03c789bc09061068134fedf4d037..b782ee7ce2a7de9d1cbf92cd4391f6b79bddd3fd 100644
--- a/services/ui/display/platform_screen.h
+++ b/services/ui/display/platform_screen.h
@@ -5,15 +5,9 @@
#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_H_
-#include <stdint.h>
-
#include <memory>
-#include "base/callback.h"
-
-namespace gfx {
-class Rect;
-}
+#include "services/ui/display/platform_screen_delegate.h"
namespace display {
@@ -21,21 +15,17 @@ namespace display {
// attached physical displays.
class PlatformScreen {
public:
- using ConfiguredDisplayCallback =
- base::Callback<void(int64_t, const gfx::Rect&)>;
-
virtual ~PlatformScreen() {}
// Creates a PlatformScreen instance.
static std::unique_ptr<PlatformScreen> Create();
- // Initializes platform specific screen resources.
- virtual void Init() = 0;
-
- // ConfigurePhysicalDisplay() configures a single physical display and returns
- // its id and bounds for it via |callback|.
- virtual void ConfigurePhysicalDisplay(
- const ConfiguredDisplayCallback& callback) = 0;
+ // Triggers initial display configuration to start. On device this will
+ // configuration the connected displays. Off device this will create one or
+ // more fake displays and pretend to configure them. A non-null |delegate|
+ // must be provided that will receive notifications when displays are added,
+ // removed or modified.
+ virtual void Init(PlatformScreenDelegate* delegate) = 0;
virtual int64_t GetPrimaryDisplayId() const = 0;
};
« no previous file with comments | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698