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