| 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 #include <string> |
| 9 |
| 8 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 9 | 11 |
| 10 // A delegate for a generic bubble that hangs off the toolbar actions bar. | 12 // A delegate for a generic bubble that hangs off the toolbar actions bar. |
| 11 class ToolbarActionsBarBubbleDelegate { | 13 class ToolbarActionsBarBubbleDelegate { |
| 12 public: | 14 public: |
| 13 enum CloseAction { | 15 enum CloseAction { |
| 14 CLOSE_LEARN_MORE, | 16 CLOSE_LEARN_MORE, |
| 15 CLOSE_EXECUTE, | 17 CLOSE_EXECUTE, |
| 16 CLOSE_DISMISS_USER_ACTION, | 18 CLOSE_DISMISS_USER_ACTION, |
| 17 CLOSE_DISMISS_DEACTIVATION, | 19 CLOSE_DISMISS_DEACTIVATION, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 // Gets the text for a second button on the bubble; this button will | 38 // Gets the text for a second button on the bubble; this button will |
| 37 // correspond with ACTION_DISMISS. If this returns an empty string, no | 39 // correspond with ACTION_DISMISS. If this returns an empty string, no |
| 38 // button will be added. | 40 // button will be added. |
| 39 virtual base::string16 GetDismissButtonText() = 0; | 41 virtual base::string16 GetDismissButtonText() = 0; |
| 40 | 42 |
| 41 // Gets the text for a "learn more" link-style button on the bubble; this | 43 // Gets the text for a "learn more" link-style button on the bubble; this |
| 42 // button will correspond with ACTION_LEARN_MORE. If this returns an empty | 44 // button will correspond with ACTION_LEARN_MORE. If this returns an empty |
| 43 // string, no button will be added. | 45 // string, no button will be added. |
| 44 virtual base::string16 GetLearnMoreButtonText() = 0; | 46 virtual base::string16 GetLearnMoreButtonText() = 0; |
| 45 | 47 |
| 48 // Returns the id of the action to point to, or the empty string if the |
| 49 // bubble should point to the center of the actions container. |
| 50 virtual std::string GetAnchorActionId() = 0; |
| 51 |
| 46 // Called when the bubble is shown. | 52 // Called when the bubble is shown. |
| 47 virtual void OnBubbleShown() = 0; | 53 virtual void OnBubbleShown() = 0; |
| 48 | 54 |
| 49 // Called when the bubble is closed with the type of action the user took. | 55 // Called when the bubble is closed with the type of action the user took. |
| 50 virtual void OnBubbleClosed(CloseAction action) = 0; | 56 virtual void OnBubbleClosed(CloseAction action) = 0; |
| 51 }; | 57 }; |
| 52 | 58 |
| 53 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ | 59 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ |
| OLD | NEW |