OLD | NEW |
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/content/renderer/autofill_agent.h" | 5 #include "components/autofill/content/renderer/autofill_agent.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 HidePopup(); | 245 HidePopup(); |
246 } | 246 } |
247 | 247 |
248 void AutofillAgent::DidChangeScrollOffset(WebLocalFrame*) { | 248 void AutofillAgent::DidChangeScrollOffset(WebLocalFrame*) { |
249 HidePopup(); | 249 HidePopup(); |
250 } | 250 } |
251 | 251 |
252 void AutofillAgent::didRequestAutocomplete( | 252 void AutofillAgent::didRequestAutocomplete( |
253 const WebFormElement& form, | 253 const WebFormElement& form, |
254 const blink::WebAutocompleteParams& details) { | 254 const blink::WebAutocompleteParams& details) { |
255 // TODO(estade): honor |details|. | 255 didRequestAutocomplete(form); |
| 256 } |
256 | 257 |
| 258 void AutofillAgent::didRequestAutocomplete( |
| 259 const WebFormElement& form) { |
257 // Disallow the dialog over non-https or broken https, except when the | 260 // Disallow the dialog over non-https or broken https, except when the |
258 // ignore SSL flag is passed. See http://crbug.com/272512. | 261 // ignore SSL flag is passed. See http://crbug.com/272512. |
259 // TODO(palmer): this should be moved to the browser process after frames | 262 // TODO(palmer): this should be moved to the browser process after frames |
260 // get their own processes. | 263 // get their own processes. |
261 GURL url(form.document().url()); | 264 GURL url(form.document().url()); |
262 content::SSLStatus ssl_status = | 265 content::SSLStatus ssl_status = |
263 render_view()->GetSSLStatusOfFrame(form.document().frame()); | 266 render_view()->GetSSLStatusOfFrame(form.document().frame()); |
264 bool is_safe = url.SchemeIs(url::kHttpsScheme) && | 267 bool is_safe = url.SchemeIs(url::kHttpsScheme) && |
265 !net::IsCertStatusError(ssl_status.cert_status); | 268 !net::IsCertStatusError(ssl_status.cert_status); |
266 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( | 269 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 // parsed form. | 705 // parsed form. |
703 if (frame && !frame->parent() && !frame->isLoading()) { | 706 if (frame && !frame->parent() && !frame->isLoading()) { |
704 ProcessForms(*frame); | 707 ProcessForms(*frame); |
705 password_autofill_agent_->OnDynamicFormsSeen(frame); | 708 password_autofill_agent_->OnDynamicFormsSeen(frame); |
706 return; | 709 return; |
707 } | 710 } |
708 } | 711 } |
709 } | 712 } |
710 | 713 |
711 } // namespace autofill | 714 } // namespace autofill |
OLD | NEW |