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.
5 #ifndef ATHENA_WM_WINDOW_MANAGER_IMPL_H_
6 #define ATHENA_WM_WINDOW_MANAGER_IMPL_H_
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"
17 class ShadowController
;
24 class WindowManagerImplTestApi
;
27 class BezelController
;
28 class SplitViewController
;
29 class WindowListProvider
;
30 class WindowManagerObserver
;
32 class WindowManagerImpl
: public WindowManager
,
33 public WindowOverviewModeDelegate
,
34 public aura::WindowObserver
,
35 public AcceleratorHandler
,
36 public TitleDragControllerDelegate
{
39 virtual ~WindowManagerImpl();
42 virtual void ToggleOverview() OVERRIDE
;
43 virtual bool IsOverviewModeActive() OVERRIDE
;
46 friend class test::WindowManagerImplTestApi
;
47 friend class AthenaContainerLayoutManager
;
51 CMD_TOGGLE_SPLIT_VIEW
,
54 // Sets whether overview mode is active.
55 void SetInOverview(bool active
);
57 void ToggleSplitview();
59 void InstallAccelerators();
62 virtual void AddObserver(WindowManagerObserver
* observer
) OVERRIDE
;
63 virtual void RemoveObserver(WindowManagerObserver
* observer
) OVERRIDE
;
65 // WindowOverviewModeDelegate:
66 virtual void OnSelectWindow(aura::Window
* window
) OVERRIDE
;
67 virtual void OnSplitViewMode(aura::Window
* left
,
68 aura::Window
* right
) OVERRIDE
;
70 // aura::WindowObserver:
71 virtual void OnWindowAdded(aura::Window
* new_window
) OVERRIDE
;
72 virtual void OnWindowDestroying(aura::Window
* window
) OVERRIDE
;
73 virtual void OnWindowStackingChanged(aura::Window
* window
) OVERRIDE
;
75 // AcceleratorHandler:
76 virtual bool IsCommandEnabled(int command_id
) const OVERRIDE
;
77 virtual bool OnAcceleratorFired(int command_id
,
78 const ui::Accelerator
& accelerator
) OVERRIDE
;
80 // TitleDragControllerDelegate:
81 virtual aura::Window
* GetWindowBehind(aura::Window
* window
) OVERRIDE
;
82 virtual void OnTitleDragStarted(aura::Window
* window
) OVERRIDE
;
83 virtual void OnTitleDragCompleted(aura::Window
* window
) OVERRIDE
;
84 virtual void OnTitleDragCanceled(aura::Window
* window
) OVERRIDE
;
86 scoped_ptr
<aura::Window
> container_
;
87 scoped_ptr
<WindowListProvider
> window_list_provider_
;
88 scoped_ptr
<WindowOverviewMode
> overview_
;
89 scoped_ptr
<BezelController
> bezel_controller_
;
90 scoped_ptr
<SplitViewController
> split_view_controller_
;
91 scoped_ptr
<wm::WMState
> wm_state_
;
92 scoped_ptr
<TitleDragController
> title_drag_controller_
;
93 scoped_ptr
<wm::ShadowController
> shadow_controller_
;
94 ObserverList
<WindowManagerObserver
> observers_
;
96 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl
);
101 #endif // ATHENA_WM_WINDOW_MANAGER_IMPL_H_