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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

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
Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index 239f49eddd5ac90831be36c1a0d3e73d02ab4adb..cd483976c9c421956c5c0faf57d4af7dfbd996d7 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -138,7 +138,6 @@ AutofillDialogControllerImpl::AutofillDialogControllerImpl(
ALLOW_THIS_IN_INITIALIZER_LIST(suggested_cc_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(suggested_billing_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(suggested_shipping_(this)),
- popup_controller_(NULL),
section_showing_popup_(SECTION_BILLING) {
// TODO(estade): |this| should observe PersonalDataManager.
// TODO(estade): remove duplicates from |form|?
@@ -590,6 +589,12 @@ content::WebContents* AutofillDialogControllerImpl::web_contents() {
////////////////////////////////////////////////////////////////////////////////
// AutofillPopupDelegate
+void AutofillDialogControllerImpl::OnPopupShown(
+ content::KeyboardListener* listener) {}
+
+void AutofillDialogControllerImpl::OnPopupHidden(
+ content::KeyboardListener* listener) {}
+
void AutofillDialogControllerImpl::DidSelectSuggestion(int identifier) {
// TODO(estade): implement.
}
@@ -625,10 +630,6 @@ void AutofillDialogControllerImpl::ClearPreviewedForm() {
// TODO(estade): implement.
}
-void AutofillDialogControllerImpl::ControllerDestroyed() {
- popup_controller_ = NULL;
-}
-
////////////////////////////////////////////////////////////////////////////////
// content::NotificationObserver
@@ -941,10 +942,8 @@ DetailInputs* AutofillDialogControllerImpl::MutableRequestedFieldsForSection(
}
void AutofillDialogControllerImpl::HidePopup() {
- if (popup_controller_) {
+ if (popup_controller_)
popup_controller_->Hide();
- ControllerDestroyed();
- }
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698