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

Unified 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: Address comments and fix test 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_popup_delegate.h
diff --git a/chrome/browser/ui/autofill/autofill_popup_delegate.h b/chrome/browser/ui/autofill/autofill_popup_delegate.h
index a8d6cc16552b79c9ba06d4bcfdab99e99511dec3..febc876ee1a0f39034416eb8c892727d3f72e10f 100644
--- a/chrome/browser/ui/autofill/autofill_popup_delegate.h
+++ b/chrome/browser/ui/autofill/autofill_popup_delegate.h
@@ -7,11 +7,21 @@
#include "base/string16.h"
+namespace content {
+class KeyboardListener;
+}
+
// An interface for interaction with AutofillPopupController. Will be notified
// of events by the controller.
class AutofillPopupDelegate {
public:
- virtual ~AutofillPopupDelegate() { }
+ // Called when the Autofill popup is shown. |listener| may be used to pass
+ // keyboard events to the popup.
+ virtual void OnPopupShown(content::KeyboardListener* listener) = 0;
+
+ // Called when the Autofill popup is hidden. |listener| must be unregistered
+ // if it was registered in OnPopupShown.
+ virtual void OnPopupHidden(content::KeyboardListener* listener) = 0;
// Called when the autofill suggestion indicated by |identifier| has been
// temporarily selected (e.g., hovered).
@@ -25,9 +35,6 @@ class AutofillPopupDelegate {
// Informs the delegate that the Autofill previewed form should be cleared.
virtual void ClearPreviewedForm() = 0;
-
- // Called to inform the delegate the controller is experiencing destruction.
- virtual void ControllerDestroyed() = 0;
};
#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698