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 // Called when the autofill suggestion indicated by |unique_id| has been | 14 // Called when the autofill suggestion indicated by |unique_id| has been |
15 // temporarily selected (e.g., hovered). | 15 // temporarily selected (e.g., hovered). |
16 virtual void SelectAutofillSuggestion(int unique_id) = 0; | 16 virtual void SelectAutofillSuggestion(int unique_id) = 0; |
17 | 17 |
18 // Inform the delegate that a row in the popup has been chosen. | 18 // Inform the delegate that a row in the popup has been chosen. |
19 // TODO(estade): does this really need to return a value? | 19 // TODO(estade): this should only pass |unique_id|. |
Ilya Sherman
2012/12/20 04:34:52
All autocomplete items have the same unique id, wh
Evan Stade
2012/12/20 20:01:25
doesn't sound very unique then. Those things shoul
Ilya Sherman
2012/12/20 21:57:42
Everything other than Autofill profiles and credit
Evan Stade
2012/12/20 23:03:59
how would the delegate know which password you're
Ilya Sherman
2012/12/20 23:11:55
A given username on a given site only ever has one
| |
20 virtual bool DidAcceptAutofillSuggestion(const string16& value, | 20 virtual void DidAcceptAutofillSuggestion(const string16& value, |
21 int unique_id, | 21 int unique_id) = 0; |
22 unsigned index) = 0; | |
23 | 22 |
24 // Remove the given Autocomplete entry from the DB. | 23 // Remove the given Autocomplete entry from the DB. |
24 // TODO(estade): this should pass |unique_id|. | |
25 virtual void RemoveAutocompleteEntry(const string16& value) = 0; | 25 virtual void RemoveAutocompleteEntry(const string16& value) = 0; |
26 | 26 |
27 // Remove the given Autofill profile or credit credit. | 27 // Remove the given Autofill profile or credit credit. |
28 virtual void RemoveAutofillProfileOrCreditCard(int unique_id) = 0; | 28 virtual void RemoveAutofillProfileOrCreditCard(int unique_id) = 0; |
29 | 29 |
30 // Informs the delegate that the Autofill previewed form should be cleared. | 30 // Informs the delegate that the Autofill previewed form should be cleared. |
31 virtual void ClearPreviewedForm() = 0; | 31 virtual void ClearPreviewedForm() = 0; |
32 | 32 |
33 // Called to inform the delegate the controller is experiencing destruction. | 33 // Called to inform the delegate the controller is experiencing destruction. |
34 virtual void ControllerDestroyed() = 0; | 34 virtual void ControllerDestroyed() = 0; |
35 }; | 35 }; |
36 | 36 |
37 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ | 37 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ |
OLD | NEW |