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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 if (popup_controller_.get()) | 164 if (popup_controller_.get()) |
165 popup_controller_->Hide(); | 165 popup_controller_->Hide(); |
166 } | 166 } |
167 | 167 |
168 void TabAutofillManagerDelegate::UpdateProgressBar(double value) { | 168 void TabAutofillManagerDelegate::UpdateProgressBar(double value) { |
169 // |dialog_controller_| is a WeakPtr, but we require it to be present when | 169 // |dialog_controller_| is a WeakPtr, but we require it to be present when |
170 // |UpdateProgressBar| is called, so we intentionally do not do NULL check. | 170 // |UpdateProgressBar| is called, so we intentionally do not do NULL check. |
171 dialog_controller_->UpdateProgressBar(value); | 171 dialog_controller_->UpdateProgressBar(value); |
172 } | 172 } |
173 | 173 |
| 174 bool TabAutofillManagerDelegate::ShouldIgnoreFormData() { |
| 175 return false; |
| 176 } |
| 177 |
174 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() { | 178 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() { |
175 if (dialog_controller_.get()) | 179 if (dialog_controller_.get()) |
176 dialog_controller_->Hide(); | 180 dialog_controller_->Hide(); |
177 } | 181 } |
178 | 182 |
179 void TabAutofillManagerDelegate::DidNavigateMainFrame( | 183 void TabAutofillManagerDelegate::DidNavigateMainFrame( |
180 const content::LoadCommittedDetails& details, | 184 const content::LoadCommittedDetails& details, |
181 const content::FrameNavigateParams& params) { | 185 const content::FrameNavigateParams& params) { |
182 // A redirect immediately after a successful Autocheckout flow shouldn't hide | 186 // A redirect immediately after a successful Autocheckout flow shouldn't hide |
183 // the dialog. | 187 // the dialog. |
184 bool was_redirect = details.entry && | 188 bool was_redirect = details.entry && |
185 content::PageTransitionIsRedirect(details.entry->GetTransitionType()); | 189 content::PageTransitionIsRedirect(details.entry->GetTransitionType()); |
186 if (dialog_controller_.get() && | 190 if (dialog_controller_.get() && |
187 (dialog_controller_->dialog_type() == DIALOG_TYPE_REQUEST_AUTOCOMPLETE || | 191 (dialog_controller_->dialog_type() == DIALOG_TYPE_REQUEST_AUTOCOMPLETE || |
188 (!dialog_controller_->AutocheckoutIsRunning() && !was_redirect))) { | 192 (!dialog_controller_->AutocheckoutIsRunning() && !was_redirect))) { |
189 HideRequestAutocompleteDialog(); | 193 HideRequestAutocompleteDialog(); |
190 } | 194 } |
191 | 195 |
192 HideAutocheckoutBubble(); | 196 HideAutocheckoutBubble(); |
193 } | 197 } |
194 | 198 |
195 } // namespace autofill | 199 } // namespace autofill |
OLD | NEW |