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

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

Issue 1086973004: [Extensions Mac] Implement developer mode warning on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
11
12 // A test delegate for a bubble to hang off the toolbar actions bar.
13 class TestToolbarActionsBarBubbleDelegate {
14 public:
15 TestToolbarActionsBarBubbleDelegate(
16 const base::string16& heading,
17 const base::string16& body,
18 const base::string16& action);
19 ~TestToolbarActionsBarBubbleDelegate();
20
21 // Returns a delegate to pass to the bubble. Since the bubble typically owns
22 // the delegate, it means we can't have this object be the delegate, because
23 // it would be deleted once the bubble closes.
24 scoped_ptr<ToolbarActionsBarBubbleDelegate> GetDelegate();
25
26 void set_dismiss_button(const base::string16& dismiss) { dismiss_ = dismiss; }
27 void set_learn_more_button(const base::string16& learn_more) {
Finnur 2015/04/16 09:52:09 Nit: It feels like these functions need a _text or
Devlin 2015/04/16 15:59:51 Done.
28 learn_more_ = learn_more;
29 }
30
31 const ToolbarActionsBarBubbleDelegate::CloseAction* close_action() const {
32 return close_action_.get();
33 }
34 bool shown() const { return shown_; }
35
36 private:
37 class DelegateImpl;
38
39 // Whether or not the bubble has been shown.
40 bool shown_;
41
42 // The action that was taken to close the bubble.
43 scoped_ptr<ToolbarActionsBarBubbleDelegate::CloseAction> close_action_;
44
45 // Strings for the bubble.
46 base::string16 heading_;
47 base::string16 body_;
48 base::string16 action_;
49 base::string16 dismiss_;
50 base::string16 learn_more_;
51
52 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionsBarBubbleDelegate);
53 };
54
55 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698