Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 #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.
| |
| 5 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ | |
| 6 | |
| 7 #include <memory> | |
| 8 | |
| 9 #include "base/macros.h" | |
| 10 #include "ui/gfx/native_widget_types.h" | |
| 11 | |
| 12 namespace chromecast { | |
| 13 | |
| 14 // Chromecast's window-manager interface. | |
| 15 // This declares the interface to add top-level windows to the Chromecast | |
| 16 // platform window. It is owned by the UI thread, and generally one instance | |
| 17 // should exist per platform root window (e.g., in Ozone, one per Ozone window). | |
| 18 class CastWindowManager { | |
| 19 public: | |
| 20 // Creates the platform-specific CastWindowManager. | |
| 21 static std::unique_ptr<CastWindowManager> Create(bool enable_input); | |
| 22 | |
| 23 virtual ~CastWindowManager() {} | |
| 24 | |
| 25 // Allocate the graphics resources and show. | |
| 26 // Can be called multiple times, including after TearDown(). | |
| 27 virtual void Setup() = 0; | |
| 28 | |
| 29 // Remove all windows and release all graphics resources. | |
| 30 // Can be called multiple times. | |
| 31 virtual void TearDown() = 0; | |
| 32 | |
| 33 // Adds a window to the window manager and shows the window. | |
| 34 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
| |
| 35 | |
| 36 // Adds a window to the window manager without adjusting the window's | |
| 37 // visibility. | |
| 38 virtual void AddWindow(gfx::NativeView window) = 0; | |
| 39 }; | |
| 40 | |
| 41 } // namespace chromecast | |
| 42 | |
| 43 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ | |
| OLD | NEW |