| 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 "base/memory/scoped_ptr.h" | |
| 9 #include "ui/gfx/animation/tween.h" | 8 #include "ui/gfx/animation/tween.h" |
| 10 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 11 | 10 |
| 12 class ToolbarActionViewController; | 11 class ToolbarActionViewController; |
| 13 | 12 |
| 14 namespace extensions { | |
| 15 class ExtensionMessageBubbleController; | |
| 16 } | |
| 17 | |
| 18 // The delegate class (which, in production, represents the view) of the | 13 // The delegate class (which, in production, represents the view) of the |
| 19 // ToolbarActionsBar. | 14 // ToolbarActionsBar. |
| 20 class ToolbarActionsBarDelegate { | 15 class ToolbarActionsBarDelegate { |
| 21 public: | 16 public: |
| 22 virtual ~ToolbarActionsBarDelegate() {} | 17 virtual ~ToolbarActionsBarDelegate() {} |
| 23 | 18 |
| 24 // Adds a view for the given |action| at |index|. | 19 // Adds a view for the given |action| at |index|. |
| 25 virtual void AddViewForAction(ToolbarActionViewController* action, | 20 virtual void AddViewForAction(ToolbarActionViewController* action, |
| 26 size_t index) = 0; | 21 size_t index) = 0; |
| 27 | 22 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 // Returns the width (including padding) for the overflow chevron. | 52 // Returns the width (including padding) for the overflow chevron. |
| 58 virtual int GetChevronWidth() const = 0; | 53 virtual int GetChevronWidth() const = 0; |
| 59 | 54 |
| 60 // Returns true if there is currently a popup running. | 55 // Returns true if there is currently a popup running. |
| 61 virtual bool IsPopupRunning() const = 0; | 56 virtual bool IsPopupRunning() const = 0; |
| 62 | 57 |
| 63 // Notifies the delegate that the value of whether or not any overflowed | 58 // Notifies the delegate that the value of whether or not any overflowed |
| 64 // action wants to run has changed. | 59 // action wants to run has changed. |
| 65 virtual void OnOverflowedActionWantsToRunChanged( | 60 virtual void OnOverflowedActionWantsToRunChanged( |
| 66 bool overflowed_action_wants_to_run) = 0; | 61 bool overflowed_action_wants_to_run) = 0; |
| 67 | |
| 68 // Displays the bubble for the passed ExtensionMessageBubbleController. | |
| 69 virtual void ShowExtensionMessageBubble( | |
| 70 scoped_ptr<extensions::ExtensionMessageBubbleController> controller) = 0; | |
| 71 }; | 62 }; |
| 72 | 63 |
| 73 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ | 64 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_ |
| OLD | NEW |