OLD | NEW |
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_AURA_H_ | 5 #ifndef CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_ |
6 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_ | 6 #define CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/observer_list.h" | |
12 #include "chromecast/graphics/cast_vsync_settings.h" | 11 #include "chromecast/graphics/cast_vsync_settings.h" |
13 #include "chromecast/graphics/cast_window_manager.h" | 12 #include "chromecast/graphics/cast_window_manager.h" |
14 | 13 |
15 namespace aura { | 14 namespace aura { |
16 class Window; | |
17 namespace client { | 15 namespace client { |
18 class DefaultCaptureClient; | 16 class DefaultCaptureClient; |
19 } // namespace client | 17 } // namespace client |
20 } // namespace aura | 18 } // namespace aura |
21 | 19 |
22 namespace chromecast { | 20 namespace chromecast { |
23 | 21 |
| 22 class CastFocusClientAura; |
24 class CastWindowTreeHost; | 23 class CastWindowTreeHost; |
25 | 24 |
26 class CastWindowManagerAura : public CastWindowManager, | 25 class CastWindowManagerAura : public CastWindowManager, |
27 private CastVSyncSettings::Observer { | 26 private CastVSyncSettings::Observer { |
28 public: | 27 public: |
29 ~CastWindowManagerAura() override; | 28 ~CastWindowManagerAura() override; |
30 | 29 |
31 // CastWindowManager implementation: | 30 // CastWindowManager implementation: |
32 void TearDown() override; | 31 void TearDown() override; |
33 void AddWindow(gfx::NativeView window) override; | 32 void AddWindow(gfx::NativeView window) override; |
34 | 33 |
35 private: | 34 private: |
36 friend class CastWindowManager; | 35 friend class CastWindowManager; |
37 | 36 |
38 // This class should only be instantiated by CastWindowManager::Create. | 37 // This class should only be instantiated by CastWindowManager::Create. |
39 explicit CastWindowManagerAura(bool enable_input); | 38 explicit CastWindowManagerAura(bool enable_input); |
40 | 39 |
41 // CastVSyncSettings::Observer implementation: | 40 // CastVSyncSettings::Observer implementation: |
42 void OnVSyncIntervalChanged(base::TimeDelta interval) override; | 41 void OnVSyncIntervalChanged(base::TimeDelta interval) override; |
43 | 42 |
44 void Setup(); | 43 void Setup(); |
45 | 44 |
46 const bool enable_input_; | 45 const bool enable_input_; |
47 std::unique_ptr<CastWindowTreeHost> window_tree_host_; | 46 std::unique_ptr<CastWindowTreeHost> window_tree_host_; |
48 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_; | 47 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_; |
| 48 std::unique_ptr<CastFocusClientAura> focus_client_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(CastWindowManagerAura); | 50 DISALLOW_COPY_AND_ASSIGN(CastWindowManagerAura); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace chromecast | 53 } // namespace chromecast |
54 | 54 |
55 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_ | 55 #endif // CHROMECAST_GRAPHICS_CAST_WINDOW_MANAGER_AURA_H_ |
OLD | NEW |