Chromium Code Reviews| 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..43e10bccce4bebc6289abe0169cfe2ffb27174ab |
| --- /dev/null |
| +++ b/chromecast/graphics/cast_window_manager.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 CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
|
alokp
2017/01/17 23:08:17
nit: The name of this directory is now wrong. We s
Joshua LeVasseur
2017/01/18 00:55:38
Acknowledged.
|
| +#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; |
| + |
| + // 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 00:50:40
why does this warrant a separate interface entry?
Joshua LeVasseur
2017/01/18 00:55:38
I was just keeping the flow similar to what was th
|
| + |
| + // Adds a window to the window manager without adjusting the window's |
| + // visibility. |
| + virtual void AddWindow(gfx::NativeView window) = 0; |
| +}; |
| + |
| +} // namespace chromecast |
| + |
| +#endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |