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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_delegate.h

Issue 12217024: Use WeakPtr to simplify AutofillPopupControllerImpl memory management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android build Created 7 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 namespace content {
11 class KeyboardListener;
12 }
13
10 // An interface for interaction with AutofillPopupController. Will be notified 14 // An interface for interaction with AutofillPopupController. Will be notified
11 // of events by the controller. 15 // of events by the controller.
12 class AutofillPopupDelegate { 16 class AutofillPopupDelegate {
13 public: 17 public:
18 // Called when the Autofill popup is shown. |listener| may be used to pass
19 // keyboard events to the popup.
20 virtual void OnPopupShown(content::KeyboardListener* listener) = 0;
21
22 // Called when the Autofill popup is hidden. |listener| must be unregistered
23 // if it was registered in OnPopupShown.
24 virtual void OnPopupHidden(content::KeyboardListener* listener) = 0;
25
14 // Called when the autofill suggestion indicated by |identifier| has been 26 // Called when the autofill suggestion indicated by |identifier| has been
15 // temporarily selected (e.g., hovered). 27 // temporarily selected (e.g., hovered).
16 virtual void DidSelectSuggestion(int identifier) = 0; 28 virtual void DidSelectSuggestion(int identifier) = 0;
17 29
18 // Inform the delegate that a row in the popup has been chosen. 30 // Inform the delegate that a row in the popup has been chosen.
19 virtual void DidAcceptSuggestion(const string16& value, int identifier) = 0; 31 virtual void DidAcceptSuggestion(const string16& value, int identifier) = 0;
20 32
21 // Delete the described suggestion. 33 // Delete the described suggestion.
22 virtual void RemoveSuggestion(const string16& value, int identifier) = 0; 34 virtual void RemoveSuggestion(const string16& value, int identifier) = 0;
23 35
24 // Informs the delegate that the Autofill previewed form should be cleared. 36 // Informs the delegate that the Autofill previewed form should be cleared.
25 virtual void ClearPreviewedForm() = 0; 37 virtual void ClearPreviewedForm() = 0;
26
27 // Called to inform the delegate the controller is experiencing destruction.
28 virtual void ControllerDestroyed() = 0;
29 }; 38 };
30 39
31 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_ 40 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698