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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate.cc

Issue 12223106: Properly Remove Autofill Keyboard Listener. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove inform_delegate_of_of_destruction 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/autofill/autocomplete_history_manager.h" 6 #include "chrome/browser/autofill/autocomplete_history_manager.h"
7 #include "chrome/browser/autofill/autofill_external_delegate.h" 7 #include "chrome/browser/autofill/autofill_external_delegate.h"
8 #include "chrome/browser/autofill/autofill_manager.h" 8 #include "chrome/browser/autofill/autofill_manager.h"
9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
10 #include "chrome/common/autofill_messages.h" 10 #include "chrome/common/autofill_messages.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 RenderViewHost* host = web_contents_->GetRenderViewHost(); 273 RenderViewHost* host = web_contents_->GetRenderViewHost();
274 274
275 if (host) 275 if (host)
276 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); 276 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
277 } 277 }
278 } 278 }
279 279
280 void AutofillExternalDelegate::HideAutofillPopup() { 280 void AutofillExternalDelegate::HideAutofillPopup() {
281 if (controller_) { 281 if (controller_) {
282 controller_->Hide(); 282 controller_->Hide();
283 OnPopupHidden(controller_.get());
284 } 283 }
Ilya Sherman 2013/02/12 21:15:25 nit: No need for curlies.
csharp 2013/02/12 21:21:19 Done.
285 } 284 }
286 285
287 void AutofillExternalDelegate::Reset() { 286 void AutofillExternalDelegate::Reset() {
288 HideAutofillPopup(); 287 HideAutofillPopup();
289 288
290 password_autofill_manager_.Reset(); 289 password_autofill_manager_.Reset();
291 } 290 }
292 291
293 void AutofillExternalDelegate::AddPasswordFormMapping( 292 void AutofillExternalDelegate::AddPasswordFormMapping(
294 const FormFieldData& form, 293 const FormFieldData& form,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 const content::NotificationDetails& details) { 415 const content::NotificationDetails& details) {
417 if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) { 416 if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED) {
418 if (!*content::Details<bool>(details).ptr()) 417 if (!*content::Details<bool>(details).ptr())
419 HideAutofillPopup(); 418 HideAutofillPopup();
420 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) { 419 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
421 HideAutofillPopup(); 420 HideAutofillPopup();
422 } else { 421 } else {
423 NOTREACHED(); 422 NOTREACHED();
424 } 423 }
425 } 424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698