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

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

Issue 12556002: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable Test On Linux Created 7 years, 9 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 0970cb619947ebe83894ad46ff4518f2f643d438..4128e9dee82390320a24069d7ff82dc94e0fe72a 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -100,7 +100,6 @@ AutofillPopupControllerImpl::AutofillPopupControllerImpl(
container_view_(container_view),
element_bounds_(element_bounds),
selected_line_(kNoSelection),
- is_hiding_(false),
weak_ptr_factory_(this) {
#if !defined(OS_ANDROID)
subtext_font_ = name_font_.DeriveFont(kLabelFontSizeDelta);
@@ -167,18 +166,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(
@@ -209,10 +204,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