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

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

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps Created 3 years, 9 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/gfx/vector_icons_public.h" 11
12 namespace gfx {
13 struct VectorIcon;
14 }
12 15
13 // A delegate for a generic bubble that hangs off the toolbar actions bar. 16 // A delegate for a generic bubble that hangs off the toolbar actions bar.
14 class ToolbarActionsBarBubbleDelegate { 17 class ToolbarActionsBarBubbleDelegate {
15 public: 18 public:
16 enum CloseAction { 19 enum CloseAction {
17 CLOSE_LEARN_MORE, 20 CLOSE_LEARN_MORE,
18 CLOSE_EXECUTE, 21 CLOSE_EXECUTE,
19 CLOSE_DISMISS_USER_ACTION, 22 CLOSE_DISMISS_USER_ACTION,
20 CLOSE_DISMISS_DEACTIVATION, 23 CLOSE_DISMISS_DEACTIVATION,
21 }; 24 };
22 25
23 // Content populating an optional view, containing an image icon and/or 26 // Content populating an optional view, containing an image icon and/or
24 // (linked) text, in the bubble. 27 // (linked) text, in the bubble.
25 struct ExtraViewInfo { 28 struct ExtraViewInfo {
26 ExtraViewInfo() 29 ExtraViewInfo() : resource(nullptr), is_text_linked(false) {}
27 : resource_id(gfx::VectorIconId::VECTOR_ICON_NONE),
28 is_text_linked(false) {}
29 30
30 // The resource id referencing the image icon. If has a value of -1, then no 31 // The resource defining the image icon. If has a value of null, then no
31 // image icon will be added. 32 // image icon will be added.
32 gfx::VectorIconId resource_id; 33 const gfx::VectorIcon* resource;
33 34
34 // Text in the view. If this is an empty string, no text will be added. 35 // Text in the view. If this is an empty string, no text will be added.
35 base::string16 text; 36 base::string16 text;
36 37
37 // If the struct's text is nonempty and this value is true, then a link of 38 // If the struct's text is nonempty and this value is true, then a link of
38 // the text is added. If this value is false, the text is not treated as a 39 // the text is added. If this value is false, the text is not treated as a
39 // link. 40 // link.
40 bool is_text_linked; 41 bool is_text_linked;
41 }; 42 };
42 43
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Called when the bubble is closed with the type of action the user took. 87 // Called when the bubble is closed with the type of action the user took.
87 virtual void OnBubbleClosed(CloseAction action) = 0; 88 virtual void OnBubbleClosed(CloseAction action) = 0;
88 89
89 // Returns the ExtraViewInfo struct associated with the bubble delegate. If 90 // Returns the ExtraViewInfo struct associated with the bubble delegate. If
90 // this returns a nullptr, no extra view (image icon and/or (linked) text) is 91 // this returns a nullptr, no extra view (image icon and/or (linked) text) is
91 // added to the bubble. 92 // added to the bubble.
92 virtual std::unique_ptr<ExtraViewInfo> GetExtraViewInfo() = 0; 93 virtual std::unique_ptr<ExtraViewInfo> GetExtraViewInfo() = 0;
93 }; 94 };
94 95
95 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_ 96 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698