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

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

Issue 12302034: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove old (now incorrect) 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_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
index 7f3634768c87351958759ee79d44b5e3f5dbce30..7196e9b2b111f16f755ee1156e628c6de7fd51dd 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -103,7 +103,6 @@ AutofillPopupControllerImpl::AutofillPopupControllerImpl(
element_bounds_(element_bounds),
selected_line_(kNoSelection),
delete_icon_hovered_(false),
- is_hiding_(false),
weak_ptr_factory_(this) {
#if !defined(OS_ANDROID)
subtext_font_ = name_font_.DeriveFont(kLabelFontSizeDelta);
@@ -170,18 +169,14 @@ void AutofillPopupControllerImpl::Show(
}
void AutofillPopupControllerImpl::Hide() {
- if (is_hiding_)
- return;
- is_hiding_ = true;
-
SetSelectedLine(kNoSelection);
delegate_->OnPopupHidden(this);
if (view_)
view_->Hide();
- else
- delete this;
+
+ delete this;
}
bool AutofillPopupControllerImpl::HandleKeyPressEvent(
@@ -212,10 +207,6 @@ bool AutofillPopupControllerImpl::HandleKeyPressEvent(
}
}
-void AutofillPopupControllerImpl::ViewDestroyed() {
- delete this;
-}
-
void AutofillPopupControllerImpl::UpdateBoundsAndRedrawPopup() {
#if !defined(OS_ANDROID)
// TODO(csharp): Since UpdatePopupBounds can change the position of the popup,

Powered by Google App Engine
This is Rietveld 408576698