| OLD | NEW |
| (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_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ | |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "base/strings/string16.h" | |
| 13 #include "components/autofill/core/browser/legal_message_line.h" | |
| 14 #include "url/gurl.h" | |
| 15 | |
| 16 namespace autofill { | |
| 17 | |
| 18 class CreditCard; | |
| 19 class SaveCardBubbleView; | |
| 20 | |
| 21 // Interface that exposes controller functionality to SaveCardBubbleView. | |
| 22 class SaveCardBubbleController { | |
| 23 public: | |
| 24 // Returns the title that should be displayed in the bubble. | |
| 25 virtual base::string16 GetWindowTitle() const = 0; | |
| 26 | |
| 27 // Returns the explanatory text that should be displayed in the bubble. | |
| 28 // Returns an empty string if no message should be displayed. | |
| 29 virtual base::string16 GetExplanatoryMessage() const = 0; | |
| 30 | |
| 31 // Returns the card that will be uploaded if the user accepts. | |
| 32 virtual const CreditCard GetCard() const = 0; | |
| 33 | |
| 34 // Interaction. | |
| 35 virtual void OnSaveButton() = 0; | |
| 36 virtual void OnCancelButton() = 0; | |
| 37 virtual void OnLearnMoreClicked() = 0; | |
| 38 virtual void OnLegalMessageLinkClicked(const GURL& url) = 0; | |
| 39 virtual void OnBubbleClosed() = 0; | |
| 40 | |
| 41 // State. | |
| 42 | |
| 43 // Returns empty vector if no legal message should be shown. | |
| 44 virtual const LegalMessageLines& GetLegalMessageLines() const = 0; | |
| 45 | |
| 46 protected: | |
| 47 SaveCardBubbleController() {} | |
| 48 virtual ~SaveCardBubbleController() {} | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleController); | |
| 51 }; | |
| 52 | |
| 53 } // namespace autofill | |
| 54 | |
| 55 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_H_ | |
| OLD | NEW |