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

Unified Diff: components/mus/ws/platform_screen.h

Issue 1899923002: Basic display management for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 8 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: components/mus/ws/platform_screen.h
diff --git a/components/mus/ws/platform_screen.h b/components/mus/ws/platform_screen.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6f672d5551574a7e5e493c7e242cf4c0a28ac2a
--- /dev/null
+++ b/components/mus/ws/platform_screen.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_
+#define COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_
+
+#include <stdint.h>
+
+#include "base/callback.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace mus {
+namespace ws {
+
+// PlatformScreen provides the necessary functionality to configure all
+// attached physical displays.
+class PlatformScreen {
+ public:
+ PlatformScreen();
sky 2016/05/04 17:05:44 You shouldn't need to have this.
rjkroege 2016/05/04 22:50:13 Done.
+ virtual ~PlatformScreen();
sky 2016/05/04 17:05:44 And inline this (we generally inline destructor fo
rjkroege 2016/05/04 22:50:13 Done. Aside: wasn't there a time when destructors
+
+ // Creates a PlatformScreen instance.
+ static std::unique_ptr<PlatformScreen> Create();
+
+ // Initializes platform specific screen resources.
+ virtual void Init() = 0;
+
+ using ConfiguredDisplayCallback = base::Callback<void(int64_t, gfx::Rect)>;
sky 2016/05/04 17:05:44 const gfx::Rect&
rjkroege 2016/05/04 22:50:13 Done.
+
+ // ConfigurePhysicalDisplay() configures a single physical display and returns
+ // its id and bounds for it via |callback|.
+ virtual void ConfigurePhysicalDisplay(
+ const ConfiguredDisplayCallback& callback) = 0;
sky 2016/05/04 17:05:44 Do you expect this to be called more than once? It
rjkroege 2016/05/04 22:50:13 Eventually yes: split-mus restarting the mus-gpu o
+};
+
+} // namespace ws
+} // namespace mus
+
+#endif // COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_

Powered by Google App Engine
This is Rietveld 408576698