Index: chromecast/graphics/cast_window_manager.h |
diff --git a/chromecast/graphics/cast_window_manager.h b/chromecast/graphics/cast_window_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73de05d5458dd4e70bf95539226b9d0c1a5e19c3 |
--- /dev/null |
+++ b/chromecast/graphics/cast_window_manager.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2017 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. |
halliwell
2017/01/18 21:11:22
blank line
Joshua LeVasseur
2017/01/19 00:56:33
Done.
|
+#ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
+#define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
+ |
+#include <memory> |
+ |
+#include "base/macros.h" |
+#include "ui/gfx/native_widget_types.h" |
+ |
+namespace chromecast { |
+ |
+// Chromecast's window-manager interface. |
+// This declares the interface to add top-level windows to the Chromecast |
+// platform window. It is owned by the UI thread, and generally one instance |
+// should exist per platform root window (e.g., in Ozone, one per Ozone window). |
+class CastWindowManager { |
+ public: |
+ // Creates the platform-specific CastWindowManager. |
+ static std::unique_ptr<CastWindowManager> Create(bool enable_input); |
+ |
+ virtual ~CastWindowManager() {} |
+ |
+ // Allocate the graphics resources and show. |
+ // Can be called multiple times, including after TearDown(). |
+ virtual void Setup() = 0; |
halliwell
2017/01/18 21:11:22
not clear what the point of this is given that Add
Joshua LeVasseur
2017/01/19 00:56:33
I've removed it. I'm going to keep implicit setup
|
+ |
+ // Remove all windows and release all graphics resources. |
+ // Can be called multiple times. |
+ virtual void TearDown() = 0; |
+ |
+ // Adds a window to the window manager and shows the window. |
+ virtual void AddAndShowWindow(gfx::NativeView window) = 0; |
halliwell
2017/01/18 21:11:22
Still seems unnecessary (just AddWindow should be
Joshua LeVasseur
2017/01/19 00:56:33
Removed.
|
+ |
+ // Adds a window to the window manager without adjusting the window's |
+ // visibility. |
halliwell
2017/01/18 21:11:22
comment that this implicitly sets up?
Joshua LeVasseur
2017/01/19 00:56:33
Done.
|
+ virtual void AddWindow(gfx::NativeView window) = 0; |
+}; |
+ |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |