Chromium Code Reviews| 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 "ui/gfx/animation/tween.h" | 8 #include "ui/gfx/animation/tween.h" |
| 9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 10 | 10 |
| 11 class ToolbarActionViewController; | 11 class ToolbarActionViewController; |
| 12 | 12 |
| 13 // The delegate class (which, in production, represents the view) of the | 13 // The delegate class (which, in production, represents the view) of the |
| 14 // ToolbarActionsBar. | 14 // ToolbarActionsBar. |
| 15 class ToolbarActionsBarDelegate { | 15 class ToolbarActionsBarDelegate { |
| 16 public: | 16 public: |
| 17 virtual ~ToolbarActionsBarDelegate() {} | 17 virtual ~ToolbarActionsBarDelegate() {} |
| 18 | 18 |
| 19 // Returns true if the delegate is ready to start adding views. | |
| 20 virtual bool IsReady() const = 0; | |
|
Peter Kasting
2014/11/14 21:31:58
Nit: Maybe IsReadyToAddViews()?
Devlin
2014/11/14 22:00:37
Sure. Done.
| |
| 21 | |
| 19 // Adds a view for the given |action| at |index|. | 22 // Adds a view for the given |action| at |index|. |
| 20 virtual void AddViewForAction(ToolbarActionViewController* action, | 23 virtual void AddViewForAction(ToolbarActionViewController* action, |
| 21 size_t index) = 0; | 24 size_t index) = 0; |
| 22 | 25 |
| 23 // Removes the view for the given |action|. | 26 // Removes the view for the given |action|. |
| 24 virtual void RemoveViewForAction(ToolbarActionViewController* action) = 0; | 27 virtual void RemoveViewForAction(ToolbarActionViewController* action) = 0; |
| 25 | 28 |
| 26 // Removes all action views. | 29 // Removes all action views. |
| 27 virtual void RemoveAllViews() = 0; | 30 virtual void RemoveAllViews() = 0; |
| 28 | 31 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 50 virtual void StopAnimating() = 0; | 53 virtual void StopAnimating() = 0; |
| 51 | 54 |
| 52 // Returns the width (including padding) for the overflow chevron. | 55 // Returns the width (including padding) for the overflow chevron. |
| 53 virtual int GetChevronWidth() const = 0; | 56 virtual int GetChevronWidth() const = 0; |
| 54 | 57 |
| 55 // Returns true if there is currently a popup running. | 58 // Returns true if there is currently a popup running. |
| 56 virtual bool IsPopupRunning() const = 0; | 59 virtual bool IsPopupRunning() const = 0; |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ | 62 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ |
| OLD | NEW |