OLD | NEW |
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 CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Undoes the current "pop out"; i.e., moves the popped out action back into | 159 // Undoes the current "pop out"; i.e., moves the popped out action back into |
160 // overflow. | 160 // overflow. |
161 void UndoPopOut(); | 161 void UndoPopOut(); |
162 | 162 |
163 // Sets the active popup owner to be |popup_owner|. | 163 // Sets the active popup owner to be |popup_owner|. |
164 void SetPopupOwner(ToolbarActionViewController* popup_owner); | 164 void SetPopupOwner(ToolbarActionViewController* popup_owner); |
165 | 165 |
166 // Hides the actively showing popup, if any. | 166 // Hides the actively showing popup, if any. |
167 void HideActivePopup(); | 167 void HideActivePopup(); |
168 | 168 |
| 169 // Sets the active sidebar owner to be |sidebar_owner|. |
| 170 void SetSidebarOwner(ToolbarActionViewController* sidebar_owner); |
| 171 |
| 172 // Hides the actively showing sidebar, if any. |
| 173 void HideActiveSidebar(); |
| 174 |
169 // Returns the main (i.e., not overflow) controller for the given action. | 175 // Returns the main (i.e., not overflow) controller for the given action. |
170 ToolbarActionViewController* GetMainControllerForAction( | 176 ToolbarActionViewController* GetMainControllerForAction( |
171 ToolbarActionViewController* action); | 177 ToolbarActionViewController* action); |
172 | 178 |
173 // Returns the underlying toolbar actions, but does not order them. Primarily | 179 // Returns the underlying toolbar actions, but does not order them. Primarily |
174 // for use in testing. | 180 // for use in testing. |
175 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() | 181 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() |
176 const { | 182 const { |
177 return toolbar_actions_.get(); | 183 return toolbar_actions_.get(); |
178 } | 184 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // Platform-specific settings for dimensions and the overflow chevron. | 263 // Platform-specific settings for dimensions and the overflow chevron. |
258 PlatformSettings platform_settings_; | 264 PlatformSettings platform_settings_; |
259 | 265 |
260 // The toolbar actions. | 266 // The toolbar actions. |
261 ToolbarActions toolbar_actions_; | 267 ToolbarActions toolbar_actions_; |
262 | 268 |
263 // The action that triggered the current popup (just a reference to an action | 269 // The action that triggered the current popup (just a reference to an action |
264 // from toolbar_actions_). | 270 // from toolbar_actions_). |
265 ToolbarActionViewController* popup_owner_; | 271 ToolbarActionViewController* popup_owner_; |
266 | 272 |
| 273 // The action that triggered the current sidebar (just a reference to an |
| 274 // action from toolbar_actions_). |
| 275 ToolbarActionViewController* sidebar_owner_; |
| 276 |
267 ScopedObserver<ToolbarActionsModel, ToolbarActionsModel::Observer> | 277 ScopedObserver<ToolbarActionsModel, ToolbarActionsModel::Observer> |
268 model_observer_; | 278 model_observer_; |
269 | 279 |
270 // True if we should suppress layout, such as when we are creating or | 280 // True if we should suppress layout, such as when we are creating or |
271 // adjusting a lot of actions at once. | 281 // adjusting a lot of actions at once. |
272 bool suppress_layout_; | 282 bool suppress_layout_; |
273 | 283 |
274 // True if we should suppress animation; we do this when first creating the | 284 // True if we should suppress animation; we do this when first creating the |
275 // toolbar, and also when switching tabs changes the state of the icons. | 285 // toolbar, and also when switching tabs changes the state of the icons. |
276 bool suppress_animation_; | 286 bool suppress_animation_; |
(...skipping 26 matching lines...) Expand all Loading... |
303 // The controller of the bubble to show once animation finishes, if any. | 313 // The controller of the bubble to show once animation finishes, if any. |
304 scoped_ptr<extensions::ExtensionMessageBubbleController> | 314 scoped_ptr<extensions::ExtensionMessageBubbleController> |
305 pending_extension_bubble_controller_; | 315 pending_extension_bubble_controller_; |
306 | 316 |
307 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; | 317 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; |
308 | 318 |
309 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 319 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
310 }; | 320 }; |
311 | 321 |
312 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 322 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
OLD | NEW |