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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 23537014: rAc: Get rid of dialog type in rAc, there is only one type left now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 return driver_->GetWebContents(); 614 return driver_->GetWebContents();
615 } 615 }
616 616
617 const std::vector<FormStructure*>& AutofillManager::GetFormStructures() { 617 const std::vector<FormStructure*>& AutofillManager::GetFormStructures() {
618 return form_structures_.get(); 618 return form_structures_.get();
619 } 619 }
620 620
621 void AutofillManager::ShowRequestAutocompleteDialog( 621 void AutofillManager::ShowRequestAutocompleteDialog(
622 const FormData& form, 622 const FormData& form,
623 const GURL& source_url, 623 const GURL& source_url,
624 autofill::DialogType dialog_type,
625 const base::Callback<void(const FormStructure*, 624 const base::Callback<void(const FormStructure*,
626 const std::string&)>& callback) { 625 const std::string&)>& callback) {
627 manager_delegate_->ShowRequestAutocompleteDialog( 626 manager_delegate_->ShowRequestAutocompleteDialog(
628 form, source_url, dialog_type, callback); 627 form, source_url, callback);
629 } 628 }
630 629
631 void AutofillManager::SetTestDelegate( 630 void AutofillManager::SetTestDelegate(
632 autofill::AutofillManagerTestDelegate* delegate) { 631 autofill::AutofillManagerTestDelegate* delegate) {
633 test_delegate_ = delegate; 632 test_delegate_ = delegate;
634 } 633 }
635 634
636 void AutofillManager::OnAddPasswordFormMapping( 635 void AutofillManager::OnAddPasswordFormMapping(
637 const FormFieldData& form, 636 const FormFieldData& form,
638 const PasswordFormFillData& fill_data) { 637 const PasswordFormFillData& fill_data) {
(...skipping 24 matching lines...) Expand all
663 const GURL& frame_url) { 662 const GURL& frame_url) {
664 if (!IsAutofillEnabled()) { 663 if (!IsAutofillEnabled()) {
665 ReturnAutocompleteResult(WebFormElement::AutocompleteResultErrorDisabled, 664 ReturnAutocompleteResult(WebFormElement::AutocompleteResultErrorDisabled,
666 FormData()); 665 FormData());
667 return; 666 return;
668 } 667 }
669 668
670 base::Callback<void(const FormStructure*, const std::string&)> callback = 669 base::Callback<void(const FormStructure*, const std::string&)> callback =
671 base::Bind(&AutofillManager::ReturnAutocompleteData, 670 base::Bind(&AutofillManager::ReturnAutocompleteData,
672 weak_ptr_factory_.GetWeakPtr()); 671 weak_ptr_factory_.GetWeakPtr());
673 ShowRequestAutocompleteDialog( 672 ShowRequestAutocompleteDialog(form, frame_url, callback);
674 form, frame_url, autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE, callback);
675 } 673 }
676 674
677 void AutofillManager::ReturnAutocompleteResult( 675 void AutofillManager::ReturnAutocompleteResult(
678 WebFormElement::AutocompleteResult result, const FormData& form_data) { 676 WebFormElement::AutocompleteResult result, const FormData& form_data) {
679 // driver_->GetWebContents() will be NULL when the interactive autocomplete 677 // driver_->GetWebContents() will be NULL when the interactive autocomplete
680 // is closed due to a tab or browser window closing. 678 // is closed due to a tab or browser window closing.
681 if (!driver_->GetWebContents()) 679 if (!driver_->GetWebContents())
682 return; 680 return;
683 681
684 RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost(); 682 RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost();
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1114
1117 void AutofillManager::UpdateInitialInteractionTimestamp( 1115 void AutofillManager::UpdateInitialInteractionTimestamp(
1118 const TimeTicks& interaction_timestamp) { 1116 const TimeTicks& interaction_timestamp) {
1119 if (initial_interaction_timestamp_.is_null() || 1117 if (initial_interaction_timestamp_.is_null() ||
1120 interaction_timestamp < initial_interaction_timestamp_) { 1118 interaction_timestamp < initial_interaction_timestamp_) {
1121 initial_interaction_timestamp_ = interaction_timestamp; 1119 initial_interaction_timestamp_ = interaction_timestamp;
1122 } 1120 }
1123 } 1121 }
1124 1122
1125 } // namespace autofill 1123 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.h ('k') | components/autofill/core/browser/autofill_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698