Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | 5 #ifndef ATHENA_WM_WINDOW_MANAGER_IMPL_H_ |
| 6 #define ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | 6 #define ATHENA_WM_WINDOW_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include "athena/input/public/accelerator_manager.h" | 8 #include "athena/input/public/accelerator_manager.h" |
| 9 #include "athena/wm/public/window_manager.h" | 9 #include "athena/wm/public/window_manager.h" |
| 10 #include "athena/wm/title_drag_controller.h" | 10 #include "athena/wm/title_drag_controller.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 friend class test::WindowManagerImplTestApi; | 46 friend class test::WindowManagerImplTestApi; |
| 47 friend class AthenaContainerLayoutManager; | 47 friend class AthenaContainerLayoutManager; |
| 48 | 48 |
| 49 enum Command { | 49 enum Command { |
| 50 CMD_TOGGLE_OVERVIEW, | 50 CMD_TOGGLE_OVERVIEW, |
| 51 CMD_TOGGLE_SPLIT_VIEW, | 51 CMD_TOGGLE_SPLIT_VIEW, |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 // Sets whether overview mode is active. | 54 // Enters overview mode. |
| 55 void SetInOverview(bool active); | 55 void EnterOverview(); |
| 56 | |
| 57 // Exits overview mode and activates |window|. |split_type| indicates whether | |
| 58 // the window should be part of split view and what position it should have in | |
| 59 // split view. | |
| 60 void ExitOverview(aura::Window* window, SplitType split_type); | |
| 61 | |
| 62 // Exits overview mode. The window which is activated and whether split view | |
| 63 // is entered or exited is determinbed based on overview mode's current state. | |
| 64 void ExitOverview(); | |
|
sadrul
2014/09/07 05:26:49
The two functions do things differently enough tha
| |
| 56 | 65 |
| 57 void ToggleSplitview(); | 66 void ToggleSplitview(); |
| 58 | 67 |
| 59 void InstallAccelerators(); | 68 void InstallAccelerators(); |
| 60 | 69 |
| 61 // WindowManager: | 70 // WindowManager: |
| 62 virtual void AddObserver(WindowManagerObserver* observer) OVERRIDE; | 71 virtual void AddObserver(WindowManagerObserver* observer) OVERRIDE; |
| 63 virtual void RemoveObserver(WindowManagerObserver* observer) OVERRIDE; | 72 virtual void RemoveObserver(WindowManagerObserver* observer) OVERRIDE; |
| 64 virtual void ToggleSplitViewForTest() OVERRIDE; | 73 virtual void ToggleSplitViewForTest() OVERRIDE; |
| 65 | 74 |
| 66 // WindowOverviewModeDelegate: | 75 // WindowOverviewModeDelegate: |
| 67 virtual void OnSelectWindow(aura::Window* window) OVERRIDE; | 76 virtual void OnSelectWindow(aura::Window* window, |
| 68 virtual void OnSplitViewMode(aura::Window* left, | 77 SplitType split_type) OVERRIDE; |
| 69 aura::Window* right) OVERRIDE; | |
| 70 | 78 |
| 71 // aura::WindowObserver: | 79 // aura::WindowObserver: |
| 72 virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE; | |
| 73 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 80 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
| 74 | 81 |
| 75 // AcceleratorHandler: | 82 // AcceleratorHandler: |
| 76 virtual bool IsCommandEnabled(int command_id) const OVERRIDE; | 83 virtual bool IsCommandEnabled(int command_id) const OVERRIDE; |
| 77 virtual bool OnAcceleratorFired(int command_id, | 84 virtual bool OnAcceleratorFired(int command_id, |
| 78 const ui::Accelerator& accelerator) OVERRIDE; | 85 const ui::Accelerator& accelerator) OVERRIDE; |
| 79 | 86 |
| 80 // TitleDragControllerDelegate: | 87 // TitleDragControllerDelegate: |
| 81 virtual aura::Window* GetWindowBehind(aura::Window* window) OVERRIDE; | 88 virtual aura::Window* GetWindowBehind(aura::Window* window) OVERRIDE; |
| 82 virtual void OnTitleDragStarted(aura::Window* window) OVERRIDE; | 89 virtual void OnTitleDragStarted(aura::Window* window) OVERRIDE; |
| 83 virtual void OnTitleDragCompleted(aura::Window* window) OVERRIDE; | 90 virtual void OnTitleDragCompleted(aura::Window* window) OVERRIDE; |
| 84 virtual void OnTitleDragCanceled(aura::Window* window) OVERRIDE; | 91 virtual void OnTitleDragCanceled(aura::Window* window) OVERRIDE; |
| 85 | 92 |
| 86 scoped_ptr<aura::Window> container_; | 93 scoped_ptr<aura::Window> container_; |
| 87 scoped_ptr<WindowListProvider> window_list_provider_; | 94 scoped_ptr<WindowListProvider> window_list_provider_; |
| 88 scoped_ptr<WindowOverviewMode> overview_; | 95 scoped_ptr<WindowOverviewMode> overview_; |
| 89 scoped_ptr<BezelController> bezel_controller_; | 96 scoped_ptr<BezelController> bezel_controller_; |
| 90 scoped_ptr<SplitViewController> split_view_controller_; | 97 scoped_ptr<SplitViewController> split_view_controller_; |
| 91 scoped_ptr<wm::WMState> wm_state_; | 98 scoped_ptr<wm::WMState> wm_state_; |
| 92 scoped_ptr<TitleDragController> title_drag_controller_; | 99 scoped_ptr<TitleDragController> title_drag_controller_; |
| 93 scoped_ptr<wm::ShadowController> shadow_controller_; | 100 scoped_ptr<wm::ShadowController> shadow_controller_; |
| 94 ObserverList<WindowManagerObserver> observers_; | 101 ObserverList<WindowManagerObserver> observers_; |
| 95 | 102 |
| 96 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); | 103 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl); |
| 97 }; | 104 }; |
| 98 | 105 |
| 99 } // namespace athena | 106 } // namespace athena |
| 100 | 107 |
| 101 #endif // ATHENA_WM_WINDOW_MANAGER_IMPL_H_ | 108 #endif // ATHENA_WM_WINDOW_MANAGER_IMPL_H_ |
| OLD | NEW |