OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_POPUP_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 | 9 |
10 // An interface for interaction with AutofillPopupController. Will be notified | 10 // An interface for interaction with AutofillPopupController. Will be notified |
11 // of events by the controller. | 11 // of events by the controller. |
12 class AutofillPopupDelegate { | 12 class AutofillPopupDelegate { |
13 public: | 13 public: |
| 14 virtual ~AutofillPopupDelegate() { } |
| 15 |
14 // Called when the autofill suggestion indicated by |identifier| has been | 16 // Called when the autofill suggestion indicated by |identifier| has been |
15 // temporarily selected (e.g., hovered). | 17 // temporarily selected (e.g., hovered). |
16 virtual void DidSelectSuggestion(int identifier) = 0; | 18 virtual void DidSelectSuggestion(int identifier) = 0; |
17 | 19 |
18 // Inform the delegate that a row in the popup has been chosen. | 20 // Inform the delegate that a row in the popup has been chosen. |
19 virtual void DidAcceptSuggestion(const string16& value, int identifier) = 0; | 21 virtual void DidAcceptSuggestion(const string16& value, int identifier) = 0; |
20 | 22 |
21 // Delete the described suggestion. | 23 // Delete the described suggestion. |
22 virtual void RemoveSuggestion(const string16& value, int identifier) = 0; | 24 virtual void RemoveSuggestion(const string16& value, int identifier) = 0; |
23 | 25 |
24 // Informs the delegate that the Autofill previewed form should be cleared. | 26 // Informs the delegate that the Autofill previewed form should be cleared. |
25 virtual void ClearPreviewedForm() = 0; | 27 virtual void ClearPreviewedForm() = 0; |
26 | 28 |
27 // Called to inform the delegate the controller is experiencing destruction. | 29 // Called to inform the delegate the controller is experiencing destruction. |
28 virtual void ControllerDestroyed() = 0; | 30 virtual void ControllerDestroyed() = 0; |
29 }; | 31 }; |
30 | 32 |
31 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ | 33 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ |
OLD | NEW |