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

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

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_grid.cc ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <vector> 13 #include <vector>
14 14
15 #include "ash/ash_export.h" 15 #include "ash/ash_export.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "ui/aura/window_observer.h" 20 #include "ui/aura/window_observer.h"
21 #include "ui/aura/window_tracker.h" 21 #include "ui/aura/window_tracker.h"
22 #include "ui/display/display_observer.h"
22 #include "ui/events/event_handler.h" 23 #include "ui/events/event_handler.h"
23 #include "ui/gfx/display_observer.h"
24 #include "ui/views/controls/textfield/textfield_controller.h" 24 #include "ui/views/controls/textfield/textfield_controller.h"
25 #include "ui/wm/public/activation_change_observer.h" 25 #include "ui/wm/public/activation_change_observer.h"
26 26
27 namespace aura { 27 namespace aura {
28 class RootWindow; 28 class RootWindow;
29 class Window; 29 class Window;
30 } 30 }
31 31
32 namespace gfx { 32 namespace gfx {
33 class Rect; 33 class Rect;
34 } 34 }
35 35
36 namespace ui { 36 namespace ui {
37 class LocatedEvent; 37 class LocatedEvent;
38 } 38 }
39 39
40 namespace views { 40 namespace views {
41 class Textfield; 41 class Textfield;
42 class Widget; 42 class Widget;
43 } 43 }
44 44
45 namespace ash { 45 namespace ash {
46 class WindowSelectorDelegate; 46 class WindowSelectorDelegate;
47 class WindowSelectorItem; 47 class WindowSelectorItem;
48 class WindowSelectorTest; 48 class WindowSelectorTest;
49 class WindowGrid; 49 class WindowGrid;
50 50
51 // The WindowSelector shows a grid of all of your windows, allowing to select 51 // The WindowSelector shows a grid of all of your windows, allowing to select
52 // one by clicking or tapping on it. 52 // one by clicking or tapping on it.
53 class ASH_EXPORT WindowSelector 53 class ASH_EXPORT WindowSelector : public display::DisplayObserver,
54 : public gfx::DisplayObserver, 54 public aura::WindowObserver,
55 public aura::WindowObserver, 55 public aura::client::ActivationChangeObserver,
56 public aura::client::ActivationChangeObserver, 56 public views::TextfieldController {
57 public views::TextfieldController {
58 public: 57 public:
59 // The distance between the top edge of the screen and the bottom edge of 58 // The distance between the top edge of the screen and the bottom edge of
60 // the text filtering textfield. 59 // the text filtering textfield.
61 static const int kTextFilterBottomEdge; 60 static const int kTextFilterBottomEdge;
62 61
63 // Returns true if the window can be selected in overview mode. 62 // Returns true if the window can be selected in overview mode.
64 static bool IsSelectable(aura::Window* window); 63 static bool IsSelectable(aura::Window* window);
65 64
66 enum Direction { 65 enum Direction {
67 LEFT, 66 LEFT,
(...skipping 20 matching lines...) Expand all
88 // Called when the last window selector item from a grid is deleted. 87 // Called when the last window selector item from a grid is deleted.
89 void OnGridEmpty(WindowGrid* grid); 88 void OnGridEmpty(WindowGrid* grid);
90 89
91 // Activates |window|. 90 // Activates |window|.
92 void SelectWindow(aura::Window* window); 91 void SelectWindow(aura::Window* window);
93 92
94 bool restoring_minimized_windows() const { 93 bool restoring_minimized_windows() const {
95 return restoring_minimized_windows_; 94 return restoring_minimized_windows_;
96 } 95 }
97 96
98 // gfx::DisplayObserver: 97 // display::DisplayObserver:
99 void OnDisplayAdded(const gfx::Display& display) override; 98 void OnDisplayAdded(const display::Display& display) override;
100 void OnDisplayRemoved(const gfx::Display& display) override; 99 void OnDisplayRemoved(const display::Display& display) override;
101 void OnDisplayMetricsChanged(const gfx::Display& display, 100 void OnDisplayMetricsChanged(const display::Display& display,
102 uint32_t metrics) override; 101 uint32_t metrics) override;
103 102
104 // aura::WindowObserver: 103 // aura::WindowObserver:
105 void OnWindowAdded(aura::Window* new_window) override; 104 void OnWindowAdded(aura::Window* new_window) override;
106 void OnWindowDestroying(aura::Window* window) override; 105 void OnWindowDestroying(aura::Window* window) override;
107 106
108 // aura::client::ActivationChangeObserver: 107 // aura::client::ActivationChangeObserver:
109 void OnWindowActivated( 108 void OnWindowActivated(
110 aura::client::ActivationChangeObserver::ActivationReason reason, 109 aura::client::ActivationChangeObserver::ActivationReason reason,
111 aura::Window* gained_active, 110 aura::Window* gained_active,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Tracks whether minimized windows are currently being restored for overview 193 // Tracks whether minimized windows are currently being restored for overview
195 // mode. 194 // mode.
196 bool restoring_minimized_windows_; 195 bool restoring_minimized_windows_;
197 196
198 DISALLOW_COPY_AND_ASSIGN(WindowSelector); 197 DISALLOW_COPY_AND_ASSIGN(WindowSelector);
199 }; 198 };
200 199
201 } // namespace ash 200 } // namespace ash
202 201
203 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 202 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
OLDNEW
« no previous file with comments | « ash/wm/overview/window_grid.cc ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698