Chromium Code Reviews| 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 ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ | 5 #ifndef ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ |
|
James Cook
2017/04/10 22:00:41
Not necessarily for this CL: Should ash/mus/bridge
sky
2017/04/10 22:16:25
Agreed
| |
| 6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ | 6 #define ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/wm_shell.h" | 13 #include "ash/shell_port.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 | 15 |
| 16 namespace aura { | 16 namespace aura { |
| 17 class WindowTreeClient; | 17 class WindowTreeClient; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace views { | 20 namespace views { |
| 21 class PointerWatcherEventRouter; | 21 class PointerWatcherEventRouter; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace ash { | 24 namespace ash { |
| 25 | 25 |
| 26 class AcceleratorControllerDelegateAura; | 26 class AcceleratorControllerDelegateAura; |
| 27 class PointerWatcherAdapter; | 27 class PointerWatcherAdapter; |
| 28 class RootWindowController; | 28 class RootWindowController; |
| 29 | 29 |
| 30 namespace mus { | 30 namespace mus { |
|
James Cook
2017/04/10 22:00:41
Not for this CL, do you intend to maintain a separ
sky
2017/04/10 22:16:25
Agreed. In fact I'm also inclined to remove the as
James Cook
2017/04/10 23:12:03
I'm OK with removing ash/mus/BUILD.gn.
| |
| 31 | 31 |
| 32 class AcceleratorControllerDelegateMus; | 32 class AcceleratorControllerDelegateMus; |
| 33 class AcceleratorControllerRegistrar; | 33 class AcceleratorControllerRegistrar; |
| 34 class ImmersiveHandlerFactoryMus; | 34 class ImmersiveHandlerFactoryMus; |
| 35 class WindowManager; | 35 class WindowManager; |
| 36 class WmShellMusTestApi; | 36 class ShellPortMashTestApi; |
| 37 | 37 |
| 38 // WmShell implementation for mus. | 38 // WmShell implementation for mus. |
|
James Cook
2017/04/10 22:00:41
nit: ShellPort.
optional: Maybe refer to README a
sky
2017/04/10 22:16:25
Done.
| |
| 39 class WmShellMus : public WmShell { | 39 class ShellPortMash : public ShellPort { |
| 40 public: | 40 public: |
| 41 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is | 41 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is |
| 42 // created. If false, the SessionStateDelegate from Shell is used. | 42 // created. If false, the SessionStateDelegate from Shell is used. |
| 43 WmShellMus(WmWindow* primary_root_window, | 43 ShellPortMash(WmWindow* primary_root_window, |
| 44 WindowManager* window_manager, | 44 WindowManager* window_manager, |
| 45 views::PointerWatcherEventRouter* pointer_watcher_event_router, | 45 views::PointerWatcherEventRouter* pointer_watcher_event_router, |
| 46 bool create_session_state_delegate_stub); | 46 bool create_session_state_delegate_stub); |
| 47 ~WmShellMus() override; | 47 ~ShellPortMash() override; |
| 48 | 48 |
| 49 static WmShellMus* Get(); | 49 static ShellPortMash* Get(); |
| 50 | 50 |
| 51 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); | 51 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); |
| 52 | 52 |
| 53 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() { | 53 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() { |
| 54 return mus_state_->accelerator_controller_delegate.get(); | 54 return mus_state_->accelerator_controller_delegate.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 aura::WindowTreeClient* window_tree_client(); | 57 aura::WindowTreeClient* window_tree_client(); |
| 58 | 58 |
| 59 WindowManager* window_manager() { return window_manager_; } | 59 WindowManager* window_manager() { return window_manager_; } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 bool IsTouchDown() override; | 103 bool IsTouchDown() override; |
| 104 void ToggleIgnoreExternalKeyboard() override; | 104 void ToggleIgnoreExternalKeyboard() override; |
| 105 void SetLaserPointerEnabled(bool enabled) override; | 105 void SetLaserPointerEnabled(bool enabled) override; |
| 106 void SetPartialMagnifierEnabled(bool enabled) override; | 106 void SetPartialMagnifierEnabled(bool enabled) override; |
| 107 void CreatePointerWatcherAdapter() override; | 107 void CreatePointerWatcherAdapter() override; |
| 108 void CreatePrimaryHost() override; | 108 void CreatePrimaryHost() override; |
| 109 void InitHosts(const ShellInitParams& init_params) override; | 109 void InitHosts(const ShellInitParams& init_params) override; |
| 110 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override; | 110 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override; |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 friend class WmShellMusTestApi; | 113 friend class ShellPortMashTestApi; |
| 114 | 114 |
| 115 struct MashSpecificState { | 115 struct MashSpecificState { |
| 116 MashSpecificState(); | 116 MashSpecificState(); |
| 117 ~MashSpecificState(); | 117 ~MashSpecificState(); |
| 118 | 118 |
| 119 views::PointerWatcherEventRouter* pointer_watcher_event_router = nullptr; | 119 views::PointerWatcherEventRouter* pointer_watcher_event_router = nullptr; |
| 120 std::unique_ptr<AcceleratorControllerDelegateMus> | 120 std::unique_ptr<AcceleratorControllerDelegateMus> |
| 121 accelerator_controller_delegate; | 121 accelerator_controller_delegate; |
| 122 std::unique_ptr<AcceleratorControllerRegistrar> | 122 std::unique_ptr<AcceleratorControllerRegistrar> |
| 123 accelerator_controller_registrar; | 123 accelerator_controller_registrar; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 137 | 137 |
| 138 WmWindow* primary_root_window_; | 138 WmWindow* primary_root_window_; |
| 139 | 139 |
| 140 // Only one of |mash_state_| or |mus_state_| is created, depending upon | 140 // Only one of |mash_state_| or |mus_state_| is created, depending upon |
| 141 // Config. | 141 // Config. |
| 142 std::unique_ptr<MashSpecificState> mash_state_; | 142 std::unique_ptr<MashSpecificState> mash_state_; |
| 143 std::unique_ptr<MusSpecificState> mus_state_; | 143 std::unique_ptr<MusSpecificState> mus_state_; |
| 144 | 144 |
| 145 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | 145 std::unique_ptr<SessionStateDelegate> session_state_delegate_; |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(WmShellMus); | 147 DISALLOW_COPY_AND_ASSIGN(ShellPortMash); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace mus | 150 } // namespace mus |
| 151 } // namespace ash | 151 } // namespace ash |
| 152 | 152 |
| 153 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ | 153 #endif // ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ |
| OLD | NEW |