OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 | 9 |
10 namespace autofill { | 10 namespace autofill { |
11 | 11 |
| 12 class AutofillDriver; |
| 13 |
12 // An interface for interaction with AutofillPopupController. Will be notified | 14 // An interface for interaction with AutofillPopupController. Will be notified |
13 // of events by the controller. | 15 // of events by the controller. |
14 class AutofillPopupDelegate { | 16 class AutofillPopupDelegate { |
15 public: | 17 public: |
16 // Called when the Autofill popup is shown. | 18 // Called when the Autofill popup is shown. |
17 virtual void OnPopupShown() = 0; | 19 virtual void OnPopupShown() = 0; |
18 | 20 |
19 // Called when the Autofill popup is hidden. | 21 // Called when the Autofill popup is hidden. |
20 virtual void OnPopupHidden() = 0; | 22 virtual void OnPopupHidden() = 0; |
21 | 23 |
(...skipping 17 matching lines...) Expand all Loading... |
39 // Delete the described suggestion. Returns true if something was deleted, | 41 // Delete the described suggestion. Returns true if something was deleted, |
40 // or false if deletion is not allowed. | 42 // or false if deletion is not allowed. |
41 virtual bool RemoveSuggestion(const base::string16& value, | 43 virtual bool RemoveSuggestion(const base::string16& value, |
42 int identifier) = 0; | 44 int identifier) = 0; |
43 | 45 |
44 // Informs the delegate that the Autofill previewed form should be cleared. | 46 // Informs the delegate that the Autofill previewed form should be cleared. |
45 virtual void ClearPreviewedForm() = 0; | 47 virtual void ClearPreviewedForm() = 0; |
46 | 48 |
47 // Returns true if popup is for credit card. | 49 // Returns true if popup is for credit card. |
48 virtual bool IsCreditCardPopup() = 0; | 50 virtual bool IsCreditCardPopup() = 0; |
| 51 |
| 52 // Returns the associated AutofillDriver. |
| 53 virtual AutofillDriver* GetAutofillDriver() = 0; |
49 }; | 54 }; |
50 | 55 |
51 } // namespace autofill | 56 } // namespace autofill |
52 | 57 |
53 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ | 58 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_POPUP_DELEGATE_H_ |
OLD | NEW |