OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/gfx/rect.h" | 8 #include "base/gfx/rect.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // gives the center of the window. | 47 // gives the center of the window. |
48 void SetBrowser(Browser* browser, int horizontal_center); | 48 void SetBrowser(Browser* browser, int horizontal_center); |
49 Browser* browser() const { return browser_; } | 49 Browser* browser() const { return browser_; } |
50 TabOverviewGrid* grid() const { return grid_; } | 50 TabOverviewGrid* grid() const { return grid_; } |
51 TabStripModel* model() const; | 51 TabStripModel* model() const; |
52 | 52 |
53 // Returns true if the grid has been moved off screen. The grid is moved | 53 // Returns true if the grid has been moved off screen. The grid is moved |
54 // offscren if the user detaches the last tab in the tab strip. | 54 // offscren if the user detaches the last tab in the tab strip. |
55 bool moved_offscreen() const { return moved_offscreen_; } | 55 bool moved_offscreen() const { return moved_offscreen_; } |
56 | 56 |
| 57 // Sets whether the mouse is over a mini-window. |
| 58 void SetMouseOverMiniWindow(bool over_mini_window); |
| 59 |
57 // Shows the grid. | 60 // Shows the grid. |
58 void Show(); | 61 void Show(); |
59 | 62 |
60 // Configures a cell from the model. | 63 // Configures a cell from the model. |
61 void ConfigureCell(TabOverviewCell* cell, TabContents* contents); | 64 void ConfigureCell(TabOverviewCell* cell, TabContents* contents); |
62 | 65 |
63 // Invoked from TabOverviewDragController. | 66 // Invoked from TabOverviewDragController. |
64 void DragStarted(); | 67 void DragStarted(); |
65 void DragEnded(); | 68 void DragEnded(); |
66 void MoveOffscreen(); | 69 void MoveOffscreen(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 gfx::Rect CalculateHostBounds(); | 122 gfx::Rect CalculateHostBounds(); |
120 | 123 |
121 // Invoked by delay_timer_. Sets show_thumbnails_ to true and starts | 124 // Invoked by delay_timer_. Sets show_thumbnails_ to true and starts |
122 // configure_timer_. | 125 // configure_timer_. |
123 void StartConfiguring(); | 126 void StartConfiguring(); |
124 | 127 |
125 // Finds the first cell with no thumbnail and invokes ConfigureCell for | 128 // Finds the first cell with no thumbnail and invokes ConfigureCell for |
126 // it. If all the thumnbails have been set configure_timer_ is stopped. | 129 // it. If all the thumnbails have been set configure_timer_ is stopped. |
127 void ConfigureNextUnconfiguredCell(); | 130 void ConfigureNextUnconfiguredCell(); |
128 | 131 |
| 132 // Starts the delay timer. |
| 133 void StartDelayTimer(); |
| 134 |
129 // The widget showing the view. | 135 // The widget showing the view. |
130 views::Widget* host_; | 136 views::Widget* host_; |
131 | 137 |
132 // Bounds of the monitor we're being displayed on. This is used to position | 138 // Bounds of the monitor we're being displayed on. This is used to position |
133 // the widget. | 139 // the widget. |
134 gfx::Rect monitor_bounds_; | 140 gfx::Rect monitor_bounds_; |
135 | 141 |
136 // View containing the grid, owned by host. | 142 // View containing the grid, owned by host. |
137 TabOverviewContainer* container_; | 143 TabOverviewContainer* container_; |
138 | 144 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // See description above class for details. | 181 // See description above class for details. |
176 base::OneShotTimer<TabOverviewController> delay_timer_; | 182 base::OneShotTimer<TabOverviewController> delay_timer_; |
177 | 183 |
178 // See description above class for details. | 184 // See description above class for details. |
179 base::RepeatingTimer<TabOverviewController> configure_timer_; | 185 base::RepeatingTimer<TabOverviewController> configure_timer_; |
180 | 186 |
181 DISALLOW_COPY_AND_ASSIGN(TabOverviewController); | 187 DISALLOW_COPY_AND_ASSIGN(TabOverviewController); |
182 }; | 188 }; |
183 | 189 |
184 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ | 190 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_OVERVIEW_CONTROLLER_H_ |
OLD | NEW |