| OLD | NEW |
| 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 "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h" | 9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h" |
| 10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 void TabAutofillManagerDelegate::HideAutocheckoutBubble() { | 150 void TabAutofillManagerDelegate::HideAutocheckoutBubble() { |
| 151 if (autocheckout_bubble_) | 151 if (autocheckout_bubble_) |
| 152 autocheckout_bubble_->HideBubble(); | 152 autocheckout_bubble_->HideBubble(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog( | 155 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog( |
| 156 const FormData& form, | 156 const FormData& form, |
| 157 const GURL& source_url, | 157 const GURL& source_url, |
| 158 const AutofillMetrics& metric_logger, | 158 const AutofillMetrics& metric_logger, |
| 159 DialogType dialog_type, | 159 DialogType dialog_type, |
| 160 const base::Callback<void(const FormStructure*)>& callback) { | 160 const base::Callback<void(const FormStructure*, |
| 161 const std::string&)>& callback) { |
| 161 HideRequestAutocompleteDialog(); | 162 HideRequestAutocompleteDialog(); |
| 162 | 163 |
| 163 dialog_controller_ = | 164 dialog_controller_ = |
| 164 new autofill::AutofillDialogControllerImpl(web_contents_, | 165 new autofill::AutofillDialogControllerImpl(web_contents_, |
| 165 form, | 166 form, |
| 166 source_url, | 167 source_url, |
| 167 metric_logger, | 168 metric_logger, |
| 168 dialog_type, | 169 dialog_type, |
| 169 callback); | 170 callback); |
| 170 dialog_controller_->Show(); | 171 dialog_controller_->Show(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 if (dialog_controller_ && | 225 if (dialog_controller_ && |
| 225 dialog_controller_->dialog_type() == | 226 dialog_controller_->dialog_type() == |
| 226 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE) { | 227 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE) { |
| 227 HideRequestAutocompleteDialog(); | 228 HideRequestAutocompleteDialog(); |
| 228 } | 229 } |
| 229 | 230 |
| 230 HideAutocheckoutBubble(); | 231 HideAutocheckoutBubble(); |
| 231 } | 232 } |
| 232 | 233 |
| 233 } // namespace autofill | 234 } // namespace autofill |
| OLD | NEW |