OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | |
6 #define ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | |
7 | |
8 #include "athena/input/public/accelerator_manager.h" | |
9 #include "athena/wm/public/window_manager.h" | |
10 #include "athena/wm/title_drag_controller.h" | |
11 #include "athena/wm/window_overview_mode.h" | |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/observer_list.h" | |
14 #include "ui/aura/window_observer.h" | |
15 | |
16 namespace wm { | |
17 class ShadowController; | |
18 class WMState; | |
19 } | |
20 | |
21 namespace athena { | |
22 | |
23 class BezelController; | |
24 class SplitViewController; | |
25 class WindowListProvider; | |
26 class WindowManagerObserver; | |
27 | |
28 class WindowManagerImpl : public WindowManager, | |
29 public WindowOverviewModeDelegate, | |
30 public aura::WindowObserver, | |
31 public AcceleratorHandler, | |
32 public TitleDragControllerDelegate { | |
33 public: | |
34 WindowManagerImpl(); | |
35 virtual ~WindowManagerImpl(); | |
36 | |
37 void Layout(); | |
38 | |
39 // WindowManager: | |
40 virtual void ToggleOverview() OVERRIDE; | |
41 | |
oshima
2014/08/18 14:48:43
remove new line
sadrul
2014/08/18 15:46:45
Done.
| |
42 virtual bool IsOverviewModeActive() OVERRIDE; | |
43 | |
44 private: | |
45 friend class WindowManagerImplTestApi; | |
46 | |
47 enum Command { | |
48 CMD_TOGGLE_OVERVIEW, | |
49 }; | |
50 | |
51 // Sets whether overview mode is active. | |
52 void SetInOverview(bool active); | |
53 | |
54 void InstallAccelerators(); | |
55 | |
56 // WindowManager: | |
57 virtual void AddObserver(WindowManagerObserver* observer) OVERRIDE; | |
58 virtual void RemoveObserver(WindowManagerObserver* observer) OVERRIDE; | |
59 | |
60 // WindowOverviewModeDelegate: | |
61 virtual void OnSelectWindow(aura::Window* window) OVERRIDE; | |
62 virtual void OnSplitViewMode(aura::Window* left, | |
63 aura::Window* right) OVERRIDE; | |
64 | |
65 // aura::WindowObserver: | |
66 virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE; | |
67 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | |
68 | |
69 // AcceleratorHandler: | |
70 virtual bool IsCommandEnabled(int command_id) const OVERRIDE; | |
71 virtual bool OnAcceleratorFired(int command_id, | |
72 const ui::Accelerator& accelerator) OVERRIDE; | |
73 | |
74 // TitleDragControllerDelegate: | |
75 virtual aura::Window* GetWindowBehind(aura::Window* window) OVERRIDE; | |
76 virtual void OnTitleDragStarted(aura::Window* window) OVERRIDE; | |
77 virtual void OnTitleDragCompleted(aura::Window* window) OVERRIDE; | |
78 virtual void OnTitleDragCanceled(aura::Window* window) OVERRIDE; | |
79 | |
80 scoped_ptr<aura::Window> container_; | |
81 scoped_ptr<WindowListProvider> window_list_provider_; | |
82 scoped_ptr<WindowOverviewMode> overview_; | |
83 scoped_ptr<BezelController> bezel_controller_; | |
84 scoped_ptr<SplitViewController> split_view_controller_; | |
85 scoped_ptr<wm::WMState> wm_state_; | |
86 scoped_ptr<TitleDragController> title_drag_controller_; | |
87 scoped_ptr<wm::ShadowController> shadow_controller_; | |
88 ObserverList<WindowManagerObserver> observers_; | |
89 | |
90 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); | |
91 }; | |
92 | |
93 } // namespace athena | |
94 | |
95 #endif // ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | |
OLD | NEW |