| 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_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 virtual void RemoveViewForAction(ToolbarActionViewController* action) = 0; | 38 virtual void RemoveViewForAction(ToolbarActionViewController* action) = 0; |
| 39 | 39 |
| 40 // Removes all action views. | 40 // Removes all action views. |
| 41 virtual void RemoveAllViews() = 0; | 41 virtual void RemoveAllViews() = 0; |
| 42 | 42 |
| 43 // Redraws the view for the toolbar actions bar. |order_changed| indicates | 43 // Redraws the view for the toolbar actions bar. |order_changed| indicates |
| 44 // whether or not the change caused a reordering of the actions. | 44 // whether or not the change caused a reordering of the actions. |
| 45 virtual void Redraw(bool order_changed) = 0; | 45 virtual void Redraw(bool order_changed) = 0; |
| 46 | 46 |
| 47 // Resizes the view to the |target_width| and animates with the given | 47 // Resizes the view to the |target_width| and animates with the given |
| 48 // |tween_type|. |suppress_chevron| indicates if the chevron should not be | 48 // |tween_type|. |
| 49 // shown during the animation. | |
| 50 virtual void ResizeAndAnimate(gfx::Tween::Type tween_type, | 49 virtual void ResizeAndAnimate(gfx::Tween::Type tween_type, |
| 51 int target_width, | 50 int target_width) = 0; |
| 52 bool suppress_chevron) = 0; | |
| 53 | |
| 54 // Sets the overflow chevron's visibility. | |
| 55 virtual void SetChevronVisibility(bool chevron_visible) = 0; | |
| 56 | 51 |
| 57 // Returns the width of the view according to |get_width_time|. | 52 // Returns the width of the view according to |get_width_time|. |
| 58 virtual int GetWidth(GetWidthTime get_width_time) const = 0; | 53 virtual int GetWidth(GetWidthTime get_width_time) const = 0; |
| 59 | 54 |
| 60 // Returns true if the view is animating. | 55 // Returns true if the view is animating. |
| 61 virtual bool IsAnimating() const = 0; | 56 virtual bool IsAnimating() const = 0; |
| 62 | 57 |
| 63 // Stops the current animation (width remains where it currently is). | 58 // Stops the current animation (width remains where it currently is). |
| 64 virtual void StopAnimating() = 0; | 59 virtual void StopAnimating() = 0; |
| 65 | 60 |
| 66 // Returns the width (including padding) for the overflow chevron. | |
| 67 virtual int GetChevronWidth() const = 0; | |
| 68 | |
| 69 // Shows the given |bubble|. Must not be called if another bubble is showing | 61 // Shows the given |bubble|. Must not be called if another bubble is showing |
| 70 // or if the toolbar is animating. | 62 // or if the toolbar is animating. |
| 71 virtual void ShowToolbarActionBubble( | 63 virtual void ShowToolbarActionBubble( |
| 72 std::unique_ptr<ToolbarActionsBarBubbleDelegate> bubble) = 0; | 64 std::unique_ptr<ToolbarActionsBarBubbleDelegate> bubble) = 0; |
| 73 }; | 65 }; |
| 74 | 66 |
| 75 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ | 67 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ |
| OLD | NEW |