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

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

Issue 676403006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/transparent_activate_window_button.cc ('k') | ash/wm/overview/window_grid.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 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 ASH_WM_OVERVIEW_WINDOW_GRID_H_ 5 #ifndef ASH_WM_OVERVIEW_WINDOW_GRID_H_
6 #define ASH_WM_OVERVIEW_WINDOW_GRID_H_ 6 #define ASH_WM_OVERVIEW_WINDOW_GRID_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/wm/overview/window_selector.h" 10 #include "ash/wm/overview/window_selector.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // 0, 1, 2, 3, 4, 5, 6 42 // 0, 1, 2, 3, 4, 5, 6
43 // - Going "top" to "bottom" 43 // - Going "top" to "bottom"
44 // 0, 3, 6, 1, 4, 2, 5 44 // 0, 3, 6, 1, 4, 2, 5
45 // The selector is switched to the next window grid (if available) or wrapped if 45 // The selector is switched to the next window grid (if available) or wrapped if
46 // it reaches the end of its movement sequence. 46 // it reaches the end of its movement sequence.
47 class ASH_EXPORT WindowGrid : public aura::WindowObserver { 47 class ASH_EXPORT WindowGrid : public aura::WindowObserver {
48 public: 48 public:
49 WindowGrid(aura::Window* root_window, 49 WindowGrid(aura::Window* root_window,
50 const std::vector<aura::Window*>& window_list, 50 const std::vector<aura::Window*>& window_list,
51 WindowSelector* window_selector); 51 WindowSelector* window_selector);
52 virtual ~WindowGrid(); 52 ~WindowGrid() override;
53 53
54 // Prepares the windows in this grid for overview. This will restore all 54 // Prepares the windows in this grid for overview. This will restore all
55 // minimized windows and ensure they are visible. 55 // minimized windows and ensure they are visible.
56 void PrepareForOverview(); 56 void PrepareForOverview();
57 57
58 // Positions all the windows in the grid. 58 // Positions all the windows in the grid.
59 void PositionWindows(bool animate); 59 void PositionWindows(bool animate);
60 60
61 // Updates |selected_index_| according to the specified |direction| and calls 61 // Updates |selected_index_| according to the specified |direction| and calls
62 // MoveSelectionWidget(). Returns |true| if the new selection index is out of 62 // MoveSelectionWidget(). Returns |true| if the new selection index is out of
(...skipping 23 matching lines...) Expand all
86 bool is_selecting() const { return selection_widget_ != NULL; } 86 bool is_selecting() const { return selection_widget_ != NULL; }
87 87
88 // Returns the root window in which the grid displays the windows. 88 // Returns the root window in which the grid displays the windows.
89 const aura::Window* root_window() const { return root_window_; } 89 const aura::Window* root_window() const { return root_window_; }
90 90
91 const std::vector<WindowSelectorItem*>& window_list() const { 91 const std::vector<WindowSelectorItem*>& window_list() const {
92 return window_list_.get(); 92 return window_list_.get();
93 } 93 }
94 94
95 // aura::WindowObserver: 95 // aura::WindowObserver:
96 virtual void OnWindowDestroying(aura::Window* window) override; 96 void OnWindowDestroying(aura::Window* window) override;
97 // TODO(flackr): Handle window bounds changed in WindowSelectorItem. 97 // TODO(flackr): Handle window bounds changed in WindowSelectorItem.
98 virtual void OnWindowBoundsChanged(aura::Window* window, 98 void OnWindowBoundsChanged(aura::Window* window,
99 const gfx::Rect& old_bounds, 99 const gfx::Rect& old_bounds,
100 const gfx::Rect& new_bounds) override; 100 const gfx::Rect& new_bounds) override;
101 101
102 private: 102 private:
103 friend class WindowSelectorTest; 103 friend class WindowSelectorTest;
104 104
105 // Internal function to initialize the selection widget. 105 // Internal function to initialize the selection widget.
106 void InitSelectionWidget(WindowSelector::Direction direction); 106 void InitSelectionWidget(WindowSelector::Direction direction);
107 107
108 // Moves the selection widget to the specified |direction|. 108 // Moves the selection widget to the specified |direction|.
109 void MoveSelectionWidget(WindowSelector::Direction direction, 109 void MoveSelectionWidget(WindowSelector::Direction direction,
110 bool recreate_selection_widget, 110 bool recreate_selection_widget,
(...skipping 26 matching lines...) Expand all
137 137
138 // Number of columns in the grid. 138 // Number of columns in the grid.
139 size_t num_columns_; 139 size_t num_columns_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(WindowGrid); 141 DISALLOW_COPY_AND_ASSIGN(WindowGrid);
142 }; 142 };
143 143
144 } // namespace ash 144 } // namespace ash
145 145
146 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_ 146 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_
OLDNEW
« no previous file with comments | « ash/wm/overview/transparent_activate_window_button.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698