OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 ASH_WM_WINDOW_SELECTOR_CONTROLLER_H_ |
| 6 #define ASH_WM_WINDOW_SELECTOR_CONTROLLER_H_ |
| 7 |
| 8 #include <list> |
| 9 #include <vector> |
| 10 |
| 11 #include "ash/ash_export.h" |
| 12 #include "ash/wm/window_selector_delegate.h" |
| 13 #include "base/basictypes.h" |
| 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "ui/aura/window_observer.h" |
| 16 |
| 17 namespace aura { |
| 18 class Window; |
| 19 } |
| 20 |
| 21 namespace ash { |
| 22 |
| 23 class WindowSelector; |
| 24 |
| 25 // Manages a window selector which displays an overview of all windows and |
| 26 // allows selecting a window to activate it. |
| 27 class ASH_EXPORT WindowSelectorController |
| 28 : public WindowSelectorDelegate { |
| 29 public: |
| 30 WindowSelectorController(); |
| 31 virtual ~WindowSelectorController(); |
| 32 |
| 33 // Returns true if selecting windows in an overview is enabled. This is false |
| 34 // at certain times, such as when the lock screen is visible. |
| 35 static bool CanSelect(); |
| 36 |
| 37 // Enters overview mode. This is essentially the window cycling mode however |
| 38 // not released on releasing the alt key and allows selecting with the mouse |
| 39 // or touch rather than keypresses. |
| 40 void ToggleOverview(); |
| 41 |
| 42 // Returns true if window selection mode is active. |
| 43 bool IsSelecting(); |
| 44 |
| 45 // WindowSelectorDelegate: |
| 46 virtual void OnWindowSelected(aura::Window* window) OVERRIDE; |
| 47 virtual void OnSelectionCanceled() OVERRIDE; |
| 48 |
| 49 private: |
| 50 scoped_ptr<WindowSelector> window_selector_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController); |
| 53 }; |
| 54 |
| 55 } // namespace ash |
| 56 |
| 57 #endif // ASH_WM_WINDOW_SELECTOR_CONTROLLER_H_ |
OLD | NEW |