| 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_EXO_WM_HELPER_MUS_H_ | 5 #ifndef COMPONENTS_EXO_WM_HELPER_MUS_H_ |
| 6 #define COMPONENTS_EXO_WM_HELPER_MUS_H_ | 6 #define COMPONENTS_EXO_WM_HELPER_MUS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/exo/wm_helper.h" | 9 #include "components/exo/wm_helper.h" |
| 10 #include "services/ui/public/cpp/window_tree_client_observer.h" |
| 11 #include "ui/aura/client/focus_change_observer.h" |
| 10 | 12 |
| 11 namespace exo { | 13 namespace exo { |
| 12 | 14 |
| 13 // A helper class for accessing WindowManager related features. | 15 // A helper class for accessing WindowManager related features. |
| 14 class WMHelperMus : public WMHelper { | 16 class WMHelperMus : public WMHelper, |
| 17 public ui::WindowTreeClientObserver, |
| 18 public aura::client::FocusChangeObserver { |
| 15 public: | 19 public: |
| 16 WMHelperMus(); | 20 WMHelperMus(); |
| 17 ~WMHelperMus() override; | 21 ~WMHelperMus() override; |
| 18 | 22 |
| 19 // Overriden from WMHelper: | 23 // Overriden from WMHelper: |
| 20 const ash::DisplayInfo GetDisplayInfo(int64_t display_id) const override; | 24 const ash::DisplayInfo GetDisplayInfo(int64_t display_id) const override; |
| 21 aura::Window* GetContainer(int container_id) override; | 25 aura::Window* GetContainer(int container_id) override; |
| 22 aura::Window* GetActiveWindow() const override; | 26 aura::Window* GetActiveWindow() const override; |
| 23 aura::Window* GetFocusedWindow() const override; | 27 aura::Window* GetFocusedWindow() const override; |
| 24 ui::CursorSetType GetCursorSet() const override; | 28 ui::CursorSetType GetCursorSet() const override; |
| 25 void AddPreTargetHandler(ui::EventHandler* handler) override; | 29 void AddPreTargetHandler(ui::EventHandler* handler) override; |
| 26 void PrependPreTargetHandler(ui::EventHandler* handler) override; | 30 void PrependPreTargetHandler(ui::EventHandler* handler) override; |
| 27 void RemovePreTargetHandler(ui::EventHandler* handler) override; | 31 void RemovePreTargetHandler(ui::EventHandler* handler) override; |
| 28 void AddPostTargetHandler(ui::EventHandler* handler) override; | 32 void AddPostTargetHandler(ui::EventHandler* handler) override; |
| 29 void RemovePostTargetHandler(ui::EventHandler* handler) override; | 33 void RemovePostTargetHandler(ui::EventHandler* handler) override; |
| 30 bool IsMaximizeModeWindowManagerEnabled() const override; | 34 bool IsMaximizeModeWindowManagerEnabled() const override; |
| 31 | 35 |
| 36 // Overriden from ui::WindowTreeClientObserver: |
| 37 void OnWindowTreeFocusChanged(ui::Window* gained_focus, |
| 38 ui::Window* lost_focus) override; |
| 39 |
| 40 // Overriden from ui::client::FocusChangeObserver: |
| 41 void OnWindowFocused(aura::Window* gained_focus, |
| 42 aura::Window* lost_focus) override; |
| 43 |
| 32 private: | 44 private: |
| 45 aura::Window* active_window_; |
| 46 aura::Window* focused_window_; |
| 47 |
| 33 DISALLOW_COPY_AND_ASSIGN(WMHelperMus); | 48 DISALLOW_COPY_AND_ASSIGN(WMHelperMus); |
| 34 }; | 49 }; |
| 35 | 50 |
| 36 } // namespace exo | 51 } // namespace exo |
| 37 | 52 |
| 38 #endif // COMPONENTS_EXO_WM_HELPER_H_ | 53 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
| OLD | NEW |