OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ |
6 #define COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ | 6 #define COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/common/shell_observer.h" | 10 #include "ash/common/shell_observer.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "components/arc/arc_bridge_service.h" | 12 #include "components/arc/arc_bridge_service.h" |
13 #include "components/arc/arc_service.h" | 13 #include "components/arc/arc_service.h" |
| 14 #include "components/arc/instance_holder.h" |
14 | 15 |
15 namespace arc { | 16 namespace arc { |
16 | 17 |
17 class ArcWindowManagerBridge : public ArcService, | 18 class ArcWindowManagerBridge |
18 public ArcBridgeService::Observer, | 19 : public ArcService, |
19 public ash::ShellObserver { | 20 public InstanceHolder<mojom::WindowManagerInstance>::Observer, |
| 21 public ash::ShellObserver { |
20 public: | 22 public: |
21 explicit ArcWindowManagerBridge(ArcBridgeService* bridge_service); | 23 explicit ArcWindowManagerBridge(ArcBridgeService* bridge_service); |
22 ~ArcWindowManagerBridge() override; | 24 ~ArcWindowManagerBridge() override; |
23 | 25 |
24 // ArcBridgeService::Observer | 26 // InstanceHolder<mojom::WindowManagerInstance>::Observer |
25 void OnWindowManagerInstanceReady() override; | 27 void OnInstanceReady(mojom::WindowManagerInstance*, |
| 28 uint32_t version) override; |
26 | 29 |
27 // Ash::Shell::ShellObserver | 30 // Ash::Shell::ShellObserver |
28 void OnMaximizeModeStarted() override; | 31 void OnMaximizeModeStarted() override; |
29 void OnMaximizeModeEnded() override; | 32 void OnMaximizeModeEnded() override; |
30 | 33 |
31 private: | 34 private: |
32 void SendWindowManagerModeChange(bool touch_view_enabled); | 35 void SendWindowManagerModeChange(bool touch_view_enabled); |
33 | 36 |
34 // Remembers the currently set mode on the Android side. | 37 // Remembers the currently set mode on the Android side. |
35 mojom::WindowManagerMode current_mode_; | 38 mojom::WindowManagerMode current_mode_; |
36 | 39 |
37 DISALLOW_COPY_AND_ASSIGN(ArcWindowManagerBridge); | 40 DISALLOW_COPY_AND_ASSIGN(ArcWindowManagerBridge); |
38 }; | 41 }; |
39 | 42 |
40 } // namespace arc | 43 } // namespace arc |
41 | 44 |
42 #endif // COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ | 45 #endif // COMPONENTS_ARC_WINDOW_MANAGER_ARC_WINDOW_MANAGER_BRIDGE_H_ |
OLD | NEW |