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

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: Add unit tests + address reviewer comments. 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h"
10 #include "ui/gfx/range/range.h"
9 11
10 namespace autofill { 12 namespace autofill {
11 13
12 class SaveCardBubbleView; 14 class SaveCardBubbleView;
13 15
14 // Interface that exposes controller functionality to SaveCardBubbleView. 16 // Interface that exposes controller functionality to SaveCardBubbleView.
15 class SaveCardBubbleController { 17 class SaveCardBubbleController {
16 public: 18 public:
19 // Interaction.
17 virtual void OnSaveButton() = 0; 20 virtual void OnSaveButton() = 0;
18 virtual void OnCancelButton() = 0; 21 virtual void OnCancelButton() = 0;
19 virtual void OnLearnMoreClicked() = 0; 22 virtual void OnLearnMoreClicked() = 0;
23 virtual void OnLegalMessageLinkClicked(const gfx::Range& link_range) = 0;
20 virtual void OnBubbleClosed() = 0; 24 virtual void OnBubbleClosed() = 0;
21 25
26 // State.
27
28 // Returns empty string if no legal message should be shown.
29 virtual const base::string16& GetLegalMessage() const = 0;
30 virtual const std::vector<gfx::Range>& GetLegalMessageLinkRanges() const = 0;
31
22 protected: 32 protected:
23 SaveCardBubbleController() {} 33 SaveCardBubbleController() {}
24 virtual ~SaveCardBubbleController() {} 34 virtual ~SaveCardBubbleController() {}
25 35
26 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController); 36 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController);
27 }; 37 };
28 38
29 } // namespace autofill 39 } // namespace autofill
30 40
31 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ 41 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698