| 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_SHELL_PORT_MASH_H_ | 5 #ifndef ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ |
| 6 #define ASH_MUS_BRIDGE_SHELL_PORT_MASH_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> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 class AcceleratorControllerDelegateMus; | 34 class AcceleratorControllerDelegateMus; |
| 35 class AcceleratorControllerRegistrar; | 35 class AcceleratorControllerRegistrar; |
| 36 class ImmersiveHandlerFactoryMus; | 36 class ImmersiveHandlerFactoryMus; |
| 37 class WindowManager; | 37 class WindowManager; |
| 38 class ShellPortMashTestApi; | 38 class ShellPortMashTestApi; |
| 39 | 39 |
| 40 // ShellPort implementation for mash/mus. See ash/README.md for more. | 40 // ShellPort implementation for mash/mus. See ash/README.md for more. |
| 41 class ShellPortMash : public ShellPort, public WindowTreeHostManager::Observer { | 41 class ShellPortMash : public ShellPort, public WindowTreeHostManager::Observer { |
| 42 public: | 42 public: |
| 43 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is | |
| 44 // created. If false, the SessionStateDelegate from Shell is used. | |
| 45 ShellPortMash(aura::Window* primary_root_window, | 43 ShellPortMash(aura::Window* primary_root_window, |
| 46 WindowManager* window_manager, | 44 WindowManager* window_manager, |
| 47 views::PointerWatcherEventRouter* pointer_watcher_event_router, | 45 views::PointerWatcherEventRouter* pointer_watcher_event_router); |
| 48 bool create_session_state_delegate_stub); | |
| 49 ~ShellPortMash() override; | 46 ~ShellPortMash() override; |
| 50 | 47 |
| 51 static ShellPortMash* Get(); | 48 static ShellPortMash* Get(); |
| 52 | 49 |
| 53 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); | 50 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); |
| 54 | 51 |
| 55 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() { | 52 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() { |
| 56 return mus_state_->accelerator_controller_delegate.get(); | 53 return mus_state_->accelerator_controller_delegate.get(); |
| 57 } | 54 } |
| 58 | 55 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 std::unique_ptr<wm::MaximizeModeEventHandler> CreateMaximizeModeEventHandler() | 90 std::unique_ptr<wm::MaximizeModeEventHandler> CreateMaximizeModeEventHandler() |
| 94 override; | 91 override; |
| 95 std::unique_ptr<WorkspaceEventHandler> CreateWorkspaceEventHandler( | 92 std::unique_ptr<WorkspaceEventHandler> CreateWorkspaceEventHandler( |
| 96 aura::Window* workspace_window) override; | 93 aura::Window* workspace_window) override; |
| 97 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> | 94 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> |
| 98 CreateScopedDisableInternalMouseAndKeyboard() override; | 95 CreateScopedDisableInternalMouseAndKeyboard() override; |
| 99 std::unique_ptr<ImmersiveFullscreenController> | 96 std::unique_ptr<ImmersiveFullscreenController> |
| 100 CreateImmersiveFullscreenController() override; | 97 CreateImmersiveFullscreenController() override; |
| 101 std::unique_ptr<KeyboardUI> CreateKeyboardUI() override; | 98 std::unique_ptr<KeyboardUI> CreateKeyboardUI() override; |
| 102 std::unique_ptr<KeyEventWatcher> CreateKeyEventWatcher() override; | 99 std::unique_ptr<KeyEventWatcher> CreateKeyEventWatcher() override; |
| 103 SessionStateDelegate* GetSessionStateDelegate() override; | |
| 104 void AddDisplayObserver(WmDisplayObserver* observer) override; | 100 void AddDisplayObserver(WmDisplayObserver* observer) override; |
| 105 void RemoveDisplayObserver(WmDisplayObserver* observer) override; | 101 void RemoveDisplayObserver(WmDisplayObserver* observer) override; |
| 106 void AddPointerWatcher(views::PointerWatcher* watcher, | 102 void AddPointerWatcher(views::PointerWatcher* watcher, |
| 107 views::PointerWatcherEventTypes events) override; | 103 views::PointerWatcherEventTypes events) override; |
| 108 void RemovePointerWatcher(views::PointerWatcher* watcher) override; | 104 void RemovePointerWatcher(views::PointerWatcher* watcher) override; |
| 109 bool IsTouchDown() override; | 105 bool IsTouchDown() override; |
| 110 void ToggleIgnoreExternalKeyboard() override; | 106 void ToggleIgnoreExternalKeyboard() override; |
| 111 void SetLaserPointerEnabled(bool enabled) override; | 107 void SetLaserPointerEnabled(bool enabled) override; |
| 112 void SetPartialMagnifierEnabled(bool enabled) override; | 108 void SetPartialMagnifierEnabled(bool enabled) override; |
| 113 void CreatePointerWatcherAdapter() override; | 109 void CreatePointerWatcherAdapter() override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 WindowManager* window_manager_; | 148 WindowManager* window_manager_; |
| 153 | 149 |
| 154 // TODO(sky): remove this once mash supports simple display management. | 150 // TODO(sky): remove this once mash supports simple display management. |
| 155 aura::Window* primary_root_window_; | 151 aura::Window* primary_root_window_; |
| 156 | 152 |
| 157 // Only one of |mash_state_| or |mus_state_| is created, depending upon | 153 // Only one of |mash_state_| or |mus_state_| is created, depending upon |
| 158 // Config. | 154 // Config. |
| 159 std::unique_ptr<MashSpecificState> mash_state_; | 155 std::unique_ptr<MashSpecificState> mash_state_; |
| 160 std::unique_ptr<MusSpecificState> mus_state_; | 156 std::unique_ptr<MusSpecificState> mus_state_; |
| 161 | 157 |
| 162 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | |
| 163 | |
| 164 std::unique_ptr<DisplaySynchronizer> display_synchronizer_; | 158 std::unique_ptr<DisplaySynchronizer> display_synchronizer_; |
| 165 | 159 |
| 166 bool added_display_observer_ = false; | 160 bool added_display_observer_ = false; |
| 167 base::ObserverList<WmDisplayObserver> display_observers_; | 161 base::ObserverList<WmDisplayObserver> display_observers_; |
| 168 | 162 |
| 169 DISALLOW_COPY_AND_ASSIGN(ShellPortMash); | 163 DISALLOW_COPY_AND_ASSIGN(ShellPortMash); |
| 170 }; | 164 }; |
| 171 | 165 |
| 172 } // namespace mus | 166 } // namespace mus |
| 173 } // namespace ash | 167 } // namespace ash |
| 174 | 168 |
| 175 #endif // ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ | 169 #endif // ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ |
| OLD | NEW |