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

Unified Diff: chrome/browser/autofill/autofill_external_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_external_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_external_delegate.h
diff --git a/chrome/browser/autofill/autofill_external_delegate.h b/chrome/browser/autofill/autofill_external_delegate.h
index 0ff3d30dd209a39060d681cbbfedd791d057d26d..692f3d71301be13a237563c86024e78c99ad0e20 100644
--- a/chrome/browser/autofill/autofill_external_delegate.h
+++ b/chrome/browser/autofill/autofill_external_delegate.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
#include "base/string16.h"
#include "chrome/browser/autofill/password_autofill_manager.h"
#include "chrome/browser/ui/autofill/autofill_popup_delegate.h"
@@ -47,12 +48,13 @@ class AutofillExternalDelegate
AutofillManager* autofill_manager);
// AutofillPopupDelegate implementation.
+ virtual void OnPopupShown(content::KeyboardListener* listener) OVERRIDE;
+ virtual void OnPopupHidden(content::KeyboardListener* listener) OVERRIDE;
virtual void DidSelectSuggestion(int identifier) OVERRIDE;
virtual void DidAcceptSuggestion(const string16& value,
int identifier) OVERRIDE;
virtual void RemoveSuggestion(const string16& value, int identifier) OVERRIDE;
virtual void ClearPreviewedForm() OVERRIDE;
- virtual void ControllerDestroyed() OVERRIDE;
// Records and associates a query_id with web form data. Called
// when the renderer posts an Autofill query to the browser. |bounds|
@@ -161,7 +163,7 @@ class AutofillExternalDelegate
// The web_contents associated with this delegate.
content::WebContents* web_contents_; // weak; owns me.
AutofillManager* autofill_manager_; // weak.
- AutofillPopupControllerImpl* controller_; // weak.
+ base::WeakPtr<AutofillPopupControllerImpl> controller_;
// Password Autofill manager, handles all password-related Autofilling.
PasswordAutofillManager password_autofill_manager_;
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_external_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698