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. | |
halliwell
2017/01/18 21:11:22
blank line
Joshua LeVasseur
2017/01/19 00:56:33
Done.
| |
4 #ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ | |
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; | |
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
| |
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 21:11:22
Still seems unnecessary (just AddWindow should be
Joshua LeVasseur
2017/01/19 00:56:33
Removed.
| |
35 | |
36 // Adds a window to the window manager without adjusting the window's | |
37 // visibility. | |
halliwell
2017/01/18 21:11:22
comment that this implicitly sets up?
Joshua LeVasseur
2017/01/19 00:56:33
Done.
| |
38 virtual void AddWindow(gfx::NativeView window) = 0; | |
39 }; | |
40 | |
41 } // namespace chromecast | |
42 | |
43 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ | |
OLD | NEW |