Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / toolbar / toolbar_actions_bar_bubble_delegate.h
blob2fb9bc8983df3cb73c1bbc04e8568354de5f45d7
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
8 #include "base/strings/string16.h"
10 // A delegate for a generic bubble that hangs off the toolbar actions bar.
11 class ToolbarActionsBarBubbleDelegate {
12 public:
13 enum CloseAction {
14 CLOSE_LEARN_MORE,
15 CLOSE_EXECUTE,
16 CLOSE_DISMISS
19 virtual ~ToolbarActionsBarBubbleDelegate() {}
21 // Gets the text for the bubble's heading (title).
22 virtual base::string16 GetHeadingText() = 0;
24 // Gets the text for the bubble's body.
25 virtual base::string16 GetBodyText() = 0;
27 // Gets the text for an optional item list to display. If this returns an
28 // empty string, no list will be added.
29 virtual base::string16 GetItemListText() = 0;
31 // Gets the text for the main button on the bubble; this button will
32 // correspond with ACTION_EXECUTE.
33 virtual base::string16 GetActionButtonText() = 0;
35 // Gets the text for a second button on the bubble; this button will
36 // correspond with ACTION_DISMISS. If this returns an empty string, no
37 // button will be added.
38 virtual base::string16 GetDismissButtonText() = 0;
40 // Gets the text for a "learn more" link-style button on the bubble; this
41 // button will correspond with ACTION_LEARN_MORE. If this returns an empty
42 // string, no button will be added.
43 virtual base::string16 GetLearnMoreButtonText() = 0;
45 // Called when the bubble is shown.
46 virtual void OnBubbleShown() = 0;
48 // Called when the bubble is closed with the type of action the user took.
49 virtual void OnBubbleClosed(CloseAction action) = 0;
52 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_