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

Side by Side Diff: chromecast/graphics/cast_window_manager.h

Issue 2636303002: [Chromecast] Add support for z-order and window focus. (Closed)
Patch Set: fix macro 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ 5 #ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_
6 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ 6 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 namespace chromecast { 13 namespace chromecast {
14 14
15 // Chromecast's window-manager interface. 15 // Chromecast's window-manager interface.
16 // This declares the interface to add top-level windows to the Chromecast 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 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). 18 // should exist per platform root window (e.g., in Ozone, one per Ozone window).
19 class CastWindowManager { 19 class CastWindowManager {
20 public: 20 public:
21 // Note: these window IDs are ordered by z-order.
22 enum {
23 BOTTOM = -1,
24 APP = BOTTOM,
25 DEBUG_OVERLAY,
26 INFO_OVERLAY,
27 SOFT_KEYBOARD,
28 VOLUME,
29 TOP = VOLUME
30 } WindowId;
halliwell 2017/01/19 20:49:17 Maybe I'm being slow, why isn't this enum WindowId
Joshua LeVasseur 2017/01/23 23:38:32 Done.
31
21 // Creates the platform-specific CastWindowManager. 32 // Creates the platform-specific CastWindowManager.
22 static std::unique_ptr<CastWindowManager> Create(bool enable_input); 33 static std::unique_ptr<CastWindowManager> Create(bool enable_input);
23 34
24 virtual ~CastWindowManager() {} 35 virtual ~CastWindowManager() {}
25 36
26 // Remove all windows and release all graphics resources. 37 // Remove all windows and release all graphics resources.
27 // Can be called multiple times. 38 // Can be called multiple times.
28 virtual void TearDown() = 0; 39 virtual void TearDown() = 0;
29 40
30 // Adds a window to the window manager. 41 // Adds a window to the window manager.
31 // This doesn't necessarily make the window visible. 42 // This doesn't necessarily make the window visible.
32 // If the window manager hasn't been initialized, this has the side effect of 43 // If the window manager hasn't been initialized, this has the side effect of
33 // causing it to initialize. 44 // causing it to initialize.
34 virtual void AddWindow(gfx::NativeView window) = 0; 45 virtual void AddWindow(gfx::NativeView window) = 0;
35 }; 46 };
36 47
37 } // namespace chromecast 48 } // namespace chromecast
38 49
39 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_ 50 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/graphics/cast_window_manager_aura.h » ('j') | chromecast/graphics/cast_window_manager_aura.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698