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

Side by Side Diff: chrome/browser/ui/autofill/save_card_bubble_controller.h

Issue 1407093007: Autofill: Add legal message footer to save credit card bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move new unittests file to non_mobile sources. Created 5 years, 1 month 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_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
7 7
8 #include <vector>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string16.h"
12 #include "ui/gfx/range/range.h"
13 #include "url/gurl.h"
9 14
10 namespace autofill { 15 namespace autofill {
11 16
12 class SaveCardBubbleView; 17 class SaveCardBubbleView;
13 18
14 // Interface that exposes controller functionality to SaveCardBubbleView. 19 // Interface that exposes controller functionality to SaveCardBubbleView.
15 class SaveCardBubbleController { 20 class SaveCardBubbleController {
16 public: 21 public:
22 struct LegalMessageLine {
23 struct Link {
24 gfx::Range range;
25 GURL url;
26 };
27
28 LegalMessageLine();
29 ~LegalMessageLine();
30
31 base::string16 text;
32 std::vector<Link> links;
33 };
34
35 // Interaction.
17 virtual void OnSaveButton() = 0; 36 virtual void OnSaveButton() = 0;
18 virtual void OnCancelButton() = 0; 37 virtual void OnCancelButton() = 0;
19 virtual void OnLearnMoreClicked() = 0; 38 virtual void OnLearnMoreClicked() = 0;
39 virtual void OnLegalMessageLinkClicked(const GURL& url) = 0;
20 virtual void OnBubbleClosed() = 0; 40 virtual void OnBubbleClosed() = 0;
21 41
42 // State.
43
44 // Returns empty vector if no legal message should be shown.
45 virtual const std::vector<LegalMessageLine>& GetLegalMessageLines() const = 0;
46
22 protected: 47 protected:
23 SaveCardBubbleController() {} 48 SaveCardBubbleController() {}
24 virtual ~SaveCardBubbleController() {} 49 virtual ~SaveCardBubbleController() {}
25 50
26 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController); 51 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController);
27 }; 52 };
28 53
29 } // namespace autofill 54 } // namespace autofill
30 55
31 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ 56 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698