OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BUBBLE_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ |
7 | 7 |
8 // A delegate for the toolbar actions bar bubble, which briefly tells users | 8 #include "base/strings/string16.h" |
9 // about the toolbar redesign. | 9 |
| 10 // A delegate for a generic bubble that hangs off the toolbar actions bar. |
10 class ToolbarActionsBarBubbleDelegate { | 11 class ToolbarActionsBarBubbleDelegate { |
11 public: | 12 public: |
12 enum CloseAction { | 13 enum CloseAction { |
13 ACKNOWLEDGED, | 14 CLOSE_LEARN_MORE, |
14 DISMISSED, | 15 CLOSE_EXECUTE, |
| 16 CLOSE_DISMISS |
15 }; | 17 }; |
16 | 18 |
17 virtual void OnToolbarActionsBarBubbleShown() = 0; | 19 virtual ~ToolbarActionsBarBubbleDelegate() {} |
18 virtual void OnToolbarActionsBarBubbleClosed(CloseAction action) = 0; | 20 |
| 21 // Gets the text for the bubble's heading (title). |
| 22 virtual base::string16 GetHeadingText() = 0; |
| 23 |
| 24 // Gets the text for the bubble's body. |
| 25 virtual base::string16 GetBodyText() = 0; |
| 26 |
| 27 // Gets the text for the main button on the bubble; this button will |
| 28 // correspond with ACTION_EXECUTE. |
| 29 virtual base::string16 GetActionButtonText() = 0; |
| 30 |
| 31 // Gets the text for a second button on the bubble; this button will |
| 32 // correspond with ACTION_DISMISS. If this returns an empty string, no |
| 33 // button will be added. |
| 34 virtual base::string16 GetDismissButtonText() = 0; |
| 35 |
| 36 // Gets the text for a "learn more" link-style button on the bubble; this |
| 37 // button will correspond with ACTION_LEARN_MORE. If this returns an empty |
| 38 // string, no button will be added. |
| 39 virtual base::string16 GetLearnMoreButtonText() = 0; |
| 40 |
| 41 // Called when the bubble is shown. |
| 42 virtual void OnBubbleShown() = 0; |
| 43 |
| 44 // Called when the bubble is closed with the type of action the user took. |
| 45 virtual void OnBubbleClosed(CloseAction action) = 0; |
19 }; | 46 }; |
20 | 47 |
21 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ | 48 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ |
OLD | NEW |