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 private: | |
reveman
2016/08/17 21:10:06
nit: please avoid overriding public virtual functi
Peng
2016/08/17 21:29:58
Done.
| |
28 // Overriden from WMHelper: | |
29 const ash::DisplayInfo GetDisplayInfo(int64_t display_id) const override; | |
30 aura::Window* GetContainer(int container_id) override; | |
31 aura::Window* GetActiveWindow() const override; | |
32 aura::Window* GetFocusedWindow() const override; | |
33 ui::CursorSetType GetCursorSet() const override; | |
34 void AddPreTargetHandler(ui::EventHandler* handler) override; | |
35 void PrependPreTargetHandler(ui::EventHandler* handler) override; | |
36 void RemovePreTargetHandler(ui::EventHandler* handler) override; | |
37 void AddPostTargetHandler(ui::EventHandler* handler) override; | |
38 void RemovePostTargetHandler(ui::EventHandler* handler) override; | |
39 bool IsMaximizeModeWindowManagerEnabled() const override; | |
40 | |
41 // Overriden from aura::client::ActivationChangeObserver: | |
42 void OnWindowActivated( | |
43 aura::client::ActivationChangeObserver::ActivationReason reason, | |
44 aura::Window* gained_active, | |
45 aura::Window* lost_active) override; | |
46 | |
47 // Overriden from aura::client::FocusChangeObserver: | |
48 void OnWindowFocused(aura::Window* gained_focus, | |
49 aura::Window* lost_focus) override; | |
50 | |
51 // Overriden from aura::client::CursorClientObserver: | |
52 void OnCursorVisibilityChanged(bool is_visible) override; | |
53 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; | |
54 | |
55 // Overriden from ash::ShellObserver: | |
56 void OnMaximizeModeStarted() override; | |
57 void OnMaximizeModeEnded() override; | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(WMHelperAsh); | |
60 }; | |
61 | |
62 } // namespace exo | |
63 | |
64 #endif // COMPONENTS_EXO_WM_HELPER_H_ | |
OLD | NEW |