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

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: refactored differently Created 4 years, 7 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..3215c28c257317d21009284acc0c55fda77ab217
--- /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:
+ virtual ~PlatformScreen() {}
+
+ // 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, const gfx::Rect&)>;
+
+ // ConfigurePhysicalDisplay() configures a single physical display and returns
+ // its id and bounds for it via |callback|.
+ virtual void ConfigurePhysicalDisplay(
+ const ConfiguredDisplayCallback& callback) = 0;
+};
+
+} // namespace ws
+} // namespace mus
+
+#endif // COMPONENTS_MUS_WS_PLATFORM_SCREEN_H_

Powered by Google App Engine
This is Rietveld 408576698