| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void HideActivePopup(); | 204 void HideActivePopup(); |
| 205 | 205 |
| 206 // Returns the main (i.e., not overflow) controller for the given action. | 206 // Returns the main (i.e., not overflow) controller for the given action. |
| 207 ToolbarActionViewController* GetMainControllerForAction( | 207 ToolbarActionViewController* GetMainControllerForAction( |
| 208 ToolbarActionViewController* action); | 208 ToolbarActionViewController* action); |
| 209 | 209 |
| 210 // Add or remove an observer. | 210 // Add or remove an observer. |
| 211 void AddObserver(ToolbarActionsBarObserver* observer); | 211 void AddObserver(ToolbarActionsBarObserver* observer); |
| 212 void RemoveObserver(ToolbarActionsBarObserver* observer); | 212 void RemoveObserver(ToolbarActionsBarObserver* observer); |
| 213 | 213 |
| 214 // Displays the given |bubble| once the toolbar is no longer animating. |
| 215 void ShowToolbarActionBubble( |
| 216 scoped_ptr<ToolbarActionsBarBubbleDelegate> bubble); |
| 217 |
| 214 // Returns the underlying toolbar actions, but does not order them. Primarily | 218 // Returns the underlying toolbar actions, but does not order them. Primarily |
| 215 // for use in testing. | 219 // for use in testing. |
| 216 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() | 220 const std::vector<ToolbarActionViewController*>& toolbar_actions_unordered() |
| 217 const { | 221 const { |
| 218 return toolbar_actions_.get(); | 222 return toolbar_actions_.get(); |
| 219 } | 223 } |
| 220 bool enabled() const { return model_ != nullptr; } | 224 bool enabled() const { return model_ != nullptr; } |
| 221 bool suppress_layout() const { return suppress_layout_; } | 225 bool suppress_layout() const { return suppress_layout_; } |
| 222 bool suppress_animation() const { | 226 bool suppress_animation() const { |
| 223 return suppress_animation_ || disable_animations_for_testing_; | 227 return suppress_animation_ || disable_animations_for_testing_; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 ToolbarActionViewController* popped_out_action_; | 333 ToolbarActionViewController* popped_out_action_; |
| 330 | 334 |
| 331 // True if the popped out action is "sticky", meaning it will stay popped | 335 // True if the popped out action is "sticky", meaning it will stay popped |
| 332 // out even if another menu is opened. | 336 // out even if another menu is opened. |
| 333 bool is_popped_out_sticky_; | 337 bool is_popped_out_sticky_; |
| 334 | 338 |
| 335 // The task to alert the |popped_out_action_| that animation has finished, and | 339 // The task to alert the |popped_out_action_| that animation has finished, and |
| 336 // it is fully popped out. | 340 // it is fully popped out. |
| 337 base::Closure popped_out_closure_; | 341 base::Closure popped_out_closure_; |
| 338 | 342 |
| 339 // The controller of the bubble to show once animation finishes, if any. | 343 // The controller of the extension message bubble to show once animation |
| 344 // finishes, if any. This has priority over |
| 345 // |pending_toolbar_bubble_controller_|. |
| 340 scoped_ptr<extensions::ExtensionMessageBubbleController> | 346 scoped_ptr<extensions::ExtensionMessageBubbleController> |
| 341 pending_extension_bubble_controller_; | 347 pending_extension_bubble_controller_; |
| 342 | 348 |
| 349 // The controller for the toolbar action bubble to show once animation |
| 350 // finishes, if any. |
| 351 scoped_ptr<ToolbarActionsBarBubbleDelegate> |
| 352 pending_toolbar_bubble_controller_; |
| 353 |
| 343 base::ObserverList<ToolbarActionsBarObserver> observers_; | 354 base::ObserverList<ToolbarActionsBarObserver> observers_; |
| 344 | 355 |
| 345 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; | 356 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; |
| 346 | 357 |
| 347 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 358 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
| 348 }; | 359 }; |
| 349 | 360 |
| 350 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 361 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| OLD | NEW |