Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Non-Mac implementation of badge/extra view, that is, admin icon and text Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/views/controls/image_view.h"
Devlin 2016/08/02 20:34:05 This is a layering violation, since this class is
catmullings 2016/08/13 00:35:52 Done.
11 12
12 // A delegate for a generic bubble that hangs off the toolbar actions bar. 13 // A delegate for a generic bubble that hangs off the toolbar actions bar.
13 class ToolbarActionsBarBubbleDelegate { 14 class ToolbarActionsBarBubbleDelegate {
14 public: 15 public:
15 enum CloseAction { 16 enum CloseAction {
16 CLOSE_LEARN_MORE, 17 CLOSE_LEARN_MORE,
17 CLOSE_EXECUTE, 18 CLOSE_EXECUTE,
18 CLOSE_DISMISS_USER_ACTION, 19 CLOSE_DISMISS_USER_ACTION,
19 CLOSE_DISMISS_DEACTIVATION, 20 CLOSE_DISMISS_DEACTIVATION,
20 }; 21 };
21 22
23 struct ExtraViewInfo {
Devlin 2016/08/02 20:34:06 Document this struct and its fields.
catmullings 2016/08/13 00:35:52 Done.
24 views::ImageView* icon;
Devlin 2016/08/02 20:34:06 So instead of ImageView here, we'd want to use a g
catmullings 2016/08/13 00:35:52 Done.
25 base::string16 text;
26 bool is_clickable;
27 };
28
22 virtual ~ToolbarActionsBarBubbleDelegate() {} 29 virtual ~ToolbarActionsBarBubbleDelegate() {}
23 30
24 // Returns true if the bubble should (still) be shown. Since bubbles are 31 // Returns true if the bubble should (still) be shown. Since bubbles are
25 // sometimes shown asynchronously, they may be invalid by the time they would 32 // sometimes shown asynchronously, they may be invalid by the time they would
26 // be displayed. 33 // be displayed.
27 virtual bool ShouldShow() = 0; 34 virtual bool ShouldShow() = 0;
28 35
29 // Returns true if the bubble should close on deactivation. 36 // Returns true if the bubble should close on deactivation.
30 virtual bool ShouldCloseOnDeactivate() = 0; 37 virtual bool ShouldCloseOnDeactivate() = 0;
31 38
(...skipping 25 matching lines...) Expand all
57 64
58 // Returns the id of the action to point to, or the empty string if the 65 // Returns the id of the action to point to, or the empty string if the
59 // bubble should point to the center of the actions container. 66 // bubble should point to the center of the actions container.
60 virtual std::string GetAnchorActionId() = 0; 67 virtual std::string GetAnchorActionId() = 0;
61 68
62 // Called when the bubble is shown. 69 // Called when the bubble is shown.
63 virtual void OnBubbleShown() = 0; 70 virtual void OnBubbleShown() = 0;
64 71
65 // Called when the bubble is closed with the type of action the user took. 72 // Called when the bubble is closed with the type of action the user took.
66 virtual void OnBubbleClosed(CloseAction action) = 0; 73 virtual void OnBubbleClosed(CloseAction action) = 0;
74
75 virtual std::unique_ptr<ExtraViewInfo> GetExtraViewInfo() = 0;
Devlin 2016/08/02 20:34:05 Add a comment explaining this method.
catmullings 2016/08/13 00:35:52 Done.
67 }; 76 };
68 77
69 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ 78 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698