Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: ash/wm/overview/window_selector_controller.h

Issue 2087153003: Moves common code in ash/wm/overview to ash/common/wm/overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 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_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
7
8 #include <list>
9 #include <memory>
10 #include <vector>
11
12 #include "ash/ash_export.h"
13 #include "ash/wm/overview/window_selector.h"
14 #include "ash/wm/overview/window_selector_delegate.h"
15 #include "base/macros.h"
16 #include "base/time/time.h"
17
18 namespace ash {
19 class WindowSelector;
20 class WindowSelectorTest;
21
22 // Manages a window selector which displays an overview of all windows and
23 // allows selecting a window to activate it.
24 class ASH_EXPORT WindowSelectorController
25 : public WindowSelectorDelegate {
26 public:
27 WindowSelectorController();
28 ~WindowSelectorController() override;
29
30 // Returns true if selecting windows in an overview is enabled. This is false
31 // at certain times, such as when the lock screen is visible.
32 static bool CanSelect();
33
34 // Enters overview mode. This is essentially the window cycling mode however
35 // not released on releasing the alt key and allows selecting with the mouse
36 // or touch rather than keypresses.
37 void ToggleOverview();
38
39 // Returns true if window selection mode is active.
40 bool IsSelecting();
41
42 // Returns true if overview mode is restoring minimized windows so that they
43 // are visible during overview mode.
44 bool IsRestoringMinimizedWindows() const;
45
46 // WindowSelectorDelegate:
47 void OnSelectionEnded() override;
48
49 private:
50 friend class WindowSelectorTest;
51
52 // Dispatched when window selection begins.
53 void OnSelectionStarted();
54
55 std::unique_ptr<WindowSelector> window_selector_;
56 base::Time last_selection_time_;
57
58 DISALLOW_COPY_AND_ASSIGN(WindowSelectorController);
59 };
60
61 } // namespace ash
62
63 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698