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

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: 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
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..1191b8764f9b855f04c2fd96b3b8ad70d2e96c19 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 InitialConfig(PlatformScreenDelegate* delegate) = 0;
sky 2016/08/25 23:40:31 optional: I think Init() is a better are more well
kylechar 2016/08/26 13:21:19 Done.
virtual int64_t GetPrimaryDisplayId() const = 0;
};

Powered by Google App Engine
This is Rietveld 408576698