| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_AURA_WM_SHELL_AURA_H_ | |
| 6 #define ASH_AURA_WM_SHELL_AURA_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "ash/ash_export.h" | |
| 11 #include "ash/display/window_tree_host_manager.h" | |
| 12 #include "ash/wm_shell.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "base/observer_list.h" | |
| 15 | |
| 16 namespace ash { | |
| 17 | |
| 18 class AcceleratorControllerDelegateAura; | |
| 19 class PointerWatcherAdapter; | |
| 20 | |
| 21 class ASH_EXPORT WmShellAura : public WmShell, | |
| 22 public WindowTreeHostManager::Observer { | |
| 23 public: | |
| 24 WmShellAura(); | |
| 25 ~WmShellAura() override; | |
| 26 | |
| 27 static WmShellAura* Get(); | |
| 28 | |
| 29 AcceleratorControllerDelegateAura* accelerator_controller_delegate() { | |
| 30 return accelerator_controller_delegate_.get(); | |
| 31 } | |
| 32 | |
| 33 // WmShell: | |
| 34 void Shutdown() override; | |
| 35 bool IsRunningInMash() const override; | |
| 36 Config GetAshConfig() const override; | |
| 37 WmWindow* GetPrimaryRootWindow() override; | |
| 38 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; | |
| 39 const display::ManagedDisplayInfo& GetDisplayInfo( | |
| 40 int64_t display_id) const override; | |
| 41 bool IsActiveDisplayId(int64_t display_id) const override; | |
| 42 display::Display GetFirstDisplay() const override; | |
| 43 bool IsInUnifiedMode() const override; | |
| 44 bool IsInUnifiedModeIgnoreMirroring() const override; | |
| 45 void SetDisplayWorkAreaInsets(WmWindow* window, | |
| 46 const gfx::Insets& insets) override; | |
| 47 void LockCursor() override; | |
| 48 void UnlockCursor() override; | |
| 49 bool IsMouseEventsEnabled() override; | |
| 50 std::vector<WmWindow*> GetAllRootWindows() override; | |
| 51 void RecordGestureAction(GestureActionType action) override; | |
| 52 void RecordUserMetricsAction(UserMetricsAction action) override; | |
| 53 void RecordTaskSwitchMetric(TaskSwitchSource source) override; | |
| 54 std::unique_ptr<WindowResizer> CreateDragWindowResizer( | |
| 55 std::unique_ptr<WindowResizer> next_window_resizer, | |
| 56 wm::WindowState* window_state) override; | |
| 57 std::unique_ptr<WindowCycleEventFilter> CreateWindowCycleEventFilter() | |
| 58 override; | |
| 59 std::unique_ptr<wm::MaximizeModeEventHandler> CreateMaximizeModeEventHandler() | |
| 60 override; | |
| 61 std::unique_ptr<WorkspaceEventHandler> CreateWorkspaceEventHandler( | |
| 62 WmWindow* workspace_window) override; | |
| 63 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> | |
| 64 CreateScopedDisableInternalMouseAndKeyboard() override; | |
| 65 std::unique_ptr<ImmersiveFullscreenController> | |
| 66 CreateImmersiveFullscreenController() override; | |
| 67 std::unique_ptr<KeyboardUI> CreateKeyboardUI() override; | |
| 68 std::unique_ptr<KeyEventWatcher> CreateKeyEventWatcher() override; | |
| 69 SessionStateDelegate* GetSessionStateDelegate() override; | |
| 70 void AddDisplayObserver(WmDisplayObserver* observer) override; | |
| 71 void RemoveDisplayObserver(WmDisplayObserver* observer) override; | |
| 72 void AddPointerWatcher(views::PointerWatcher* watcher, | |
| 73 views::PointerWatcherEventTypes events) override; | |
| 74 void RemovePointerWatcher(views::PointerWatcher* watcher) override; | |
| 75 bool IsTouchDown() override; | |
| 76 void ToggleIgnoreExternalKeyboard() override; | |
| 77 void SetLaserPointerEnabled(bool enabled) override; | |
| 78 void SetPartialMagnifierEnabled(bool enabled) override; | |
| 79 void CreatePointerWatcherAdapter() override; | |
| 80 void CreatePrimaryHost() override; | |
| 81 void InitHosts(const ShellInitParams& init_params) override; | |
| 82 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override; | |
| 83 | |
| 84 private: | |
| 85 // WindowTreeHostManager::Observer: | |
| 86 void OnDisplayConfigurationChanging() override; | |
| 87 void OnDisplayConfigurationChanged() override; | |
| 88 | |
| 89 std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter_; | |
| 90 | |
| 91 bool added_display_observer_ = false; | |
| 92 base::ObserverList<WmDisplayObserver> display_observers_; | |
| 93 | |
| 94 std::unique_ptr<AcceleratorControllerDelegateAura> | |
| 95 accelerator_controller_delegate_; | |
| 96 | |
| 97 DISALLOW_COPY_AND_ASSIGN(WmShellAura); | |
| 98 }; | |
| 99 | |
| 100 } // namespace ash | |
| 101 | |
| 102 #endif // ASH_AURA_WM_SHELL_AURA_H_ | |
| OLD | NEW |