OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
| 6 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "ui/gfx/native_widget_types.h" |
| 12 |
| 13 namespace chromecast { |
| 14 |
| 15 // Chromecast's window-manager interface. |
| 16 // This declares the interface to add top-level windows to the Chromecast |
| 17 // platform window. It is owned by the UI thread, and generally one instance |
| 18 // should exist per platform root window (e.g., in Ozone, one per Ozone window). |
| 19 class CastWindowManager { |
| 20 public: |
| 21 // Creates the platform-specific CastWindowManager. |
| 22 static std::unique_ptr<CastWindowManager> Create(bool enable_input); |
| 23 |
| 24 virtual ~CastWindowManager() {} |
| 25 |
| 26 // Remove all windows and release all graphics resources. |
| 27 // Can be called multiple times. |
| 28 virtual void TearDown() = 0; |
| 29 |
| 30 // Adds a window to the window manager. |
| 31 // This doesn't necessarily make the window visible. |
| 32 // If the window manager hasn't been initialized, this has the side effect of |
| 33 // causing it to initialize. |
| 34 virtual void AddWindow(gfx::NativeView window) = 0; |
| 35 }; |
| 36 |
| 37 } // namespace chromecast |
| 38 |
| 39 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ |
OLD | NEW |