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

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: Change interface for retrieving lines + give each line its own StyledLabel. 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"
9 13
10 namespace autofill { 14 namespace autofill {
11 15
12 class SaveCardBubbleView; 16 class SaveCardBubbleView;
13 17
14 // Interface that exposes controller functionality to SaveCardBubbleView. 18 // Interface that exposes controller functionality to SaveCardBubbleView.
15 class SaveCardBubbleController { 19 class SaveCardBubbleController {
16 public: 20 public:
21 struct LegalMessageLine {
bondd 2015/11/13 01:19:52 I want to use this as POD, but chromium-style requ
22 struct Link {
23 gfx::Range range;
24 std::string url;
Evan Stade 2015/11/13 01:33:07 nit: GURL
bondd 2015/11/13 22:30:43 Done.
25 };
26
27 LegalMessageLine();
28 ~LegalMessageLine();
29
30 base::string16 text;
31 std::vector<Link> links;
32 };
33
34 // Interaction.
17 virtual void OnSaveButton() = 0; 35 virtual void OnSaveButton() = 0;
18 virtual void OnCancelButton() = 0; 36 virtual void OnCancelButton() = 0;
19 virtual void OnLearnMoreClicked() = 0; 37 virtual void OnLearnMoreClicked() = 0;
38 virtual void OnLegalMessageLinkClicked(const std::string& url) = 0;
20 virtual void OnBubbleClosed() = 0; 39 virtual void OnBubbleClosed() = 0;
21 40
41 // State.
42
43 // Returns empty vector if no legal message should be shown.
44 virtual const std::vector<LegalMessageLine>& GetLegalMessageLines() const = 0;
45
22 protected: 46 protected:
23 SaveCardBubbleController() {} 47 SaveCardBubbleController() {}
24 virtual ~SaveCardBubbleController() {} 48 virtual ~SaveCardBubbleController() {}
25 49
26 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController); 50 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController);
27 }; 51 };
28 52
29 } // namespace autofill 53 } // namespace autofill
30 54
31 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ 55 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698