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 COMPONENTS_EXO_WM_HELPER_ASH_H_ |
| 6 #define COMPONENTS_EXO_WM_HELPER_ASH_H_ |
| 7 |
| 8 #include "ash/common/shell_observer.h" |
| 9 #include "base/macros.h" |
| 10 #include "components/exo/wm_helper.h" |
| 11 #include "ui/aura/client/cursor_client_observer.h" |
| 12 #include "ui/aura/client/focus_change_observer.h" |
| 13 #include "ui/wm/public/activation_change_observer.h" |
| 14 |
| 15 namespace exo { |
| 16 |
| 17 // A helper class for accessing WindowManager related features. |
| 18 class WMHelperAsh : public WMHelper, |
| 19 public aura::client::ActivationChangeObserver, |
| 20 public aura::client::FocusChangeObserver, |
| 21 public aura::client::CursorClientObserver, |
| 22 public ash::ShellObserver { |
| 23 public: |
| 24 WMHelperAsh(); |
| 25 ~WMHelperAsh() override; |
| 26 |
| 27 // Overriden from WMHelper: |
| 28 const ash::DisplayInfo GetDisplayInfo(int64_t display_id) const override; |
| 29 aura::Window* GetContainer(int container_id) override; |
| 30 aura::Window* GetActiveWindow() const override; |
| 31 aura::Window* GetFocusedWindow() const override; |
| 32 ui::CursorSetType GetCursorSet() const override; |
| 33 void AddPreTargetHandler(ui::EventHandler* handler) override; |
| 34 void PrependPreTargetHandler(ui::EventHandler* handler) override; |
| 35 void RemovePreTargetHandler(ui::EventHandler* handler) override; |
| 36 void AddPostTargetHandler(ui::EventHandler* handler) override; |
| 37 void RemovePostTargetHandler(ui::EventHandler* handler) override; |
| 38 bool IsMaximizeModeWindowManagerEnabled() const override; |
| 39 |
| 40 // Overriden from aura::client::ActivationChangeObserver: |
| 41 void OnWindowActivated( |
| 42 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 43 aura::Window* gained_active, |
| 44 aura::Window* lost_active) override; |
| 45 |
| 46 // Overriden from aura::client::FocusChangeObserver: |
| 47 void OnWindowFocused(aura::Window* gained_focus, |
| 48 aura::Window* lost_focus) override; |
| 49 |
| 50 // Overriden from aura::client::CursorClientObserver: |
| 51 void OnCursorVisibilityChanged(bool is_visible) override; |
| 52 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; |
| 53 |
| 54 // Overriden from ash::ShellObserver: |
| 55 void OnMaximizeModeStarted() override; |
| 56 void OnMaximizeModeEnded() override; |
| 57 |
| 58 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); |
| 60 }; |
| 61 |
| 62 } // namespace exo |
| 63 |
| 64 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
OLD | NEW |