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

Unified Diff: chromecast/graphics/cast_window_manager.h

Issue 2643553002: [Chromecast] Reuse the Aura window manager across receiver apps. (Closed)
Patch Set: applied reviewer feedback Created 3 years, 11 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 | « chromecast/graphics/DEPS ('k') | chromecast/graphics/cast_window_manager_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bf2dc4b63f3a292c79bd76465b361db176441208
--- /dev/null
+++ b/chromecast/graphics/cast_window_manager.h
@@ -0,0 +1,39 @@
+// 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.
+
+#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() {}
+
+ // Remove all windows and release all graphics resources.
+ // Can be called multiple times.
+ virtual void TearDown() = 0;
+
+ // Adds a window to the window manager.
+ // This doesn't necessarily make the window visible.
+ // If the window manager hasn't been initialized, this has the side effect of
+ // causing it to initialize.
+ virtual void AddWindow(gfx::NativeView window) = 0;
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_
« no previous file with comments | « chromecast/graphics/DEPS ('k') | chromecast/graphics/cast_window_manager_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698