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

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: Avi's 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_text(const base::string16& dismiss) {
27 dismiss_ = dismiss;
28 }
29 void set_learn_more_button_text(const base::string16& learn_more) {
30 learn_more_ = learn_more;
31 }
32
33 const ToolbarActionsBarBubbleDelegate::CloseAction* close_action() const {
34 return close_action_.get();
35 }
36 bool shown() const { return shown_; }
37
38 private:
39 class DelegateImpl;
40
41 // Whether or not the bubble has been shown.
42 bool shown_;
43
44 // The action that was taken to close the bubble.
45 scoped_ptr<ToolbarActionsBarBubbleDelegate::CloseAction> close_action_;
46
47 // Strings for the bubble.
48 base::string16 heading_;
49 base::string16 body_;
50 base::string16 action_;
51 base::string16 dismiss_;
52 base::string16 learn_more_;
53
54 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionsBarBubbleDelegate);
55 };
56
57 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTIONS_BAR_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698