| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 REQUIRE_AUTOCOMPLETE, | 205 REQUIRE_AUTOCOMPLETE, |
| 206 static_cast<ExtractMask>( | 206 static_cast<ExtractMask>( |
| 207 EXTRACT_VALUE | EXTRACT_OPTION_TEXT), | 207 EXTRACT_VALUE | EXTRACT_OPTION_TEXT), |
| 208 &form_data, | 208 &form_data, |
| 209 NULL)) { | 209 NULL)) { |
| 210 Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data, | 210 Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data, |
| 211 base::TimeTicks::Now())); | 211 base::TimeTicks::Now())); |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 void AutofillAgent::ZoomLevelChanged() { | |
| 216 // Any time the zoom level changes, the page's content moves, so any Autofill | |
| 217 // popups should be hidden. This is only needed for the new Autofill UI | |
| 218 // because WebKit already knows to hide the old UI when this occurs. | |
| 219 HidePopup(); | |
| 220 } | |
| 221 | |
| 222 void AutofillAgent::FocusedNodeChanged(const WebNode& node) { | 215 void AutofillAgent::FocusedNodeChanged(const WebNode& node) { |
| 223 if (password_generation_agent_ && | 216 if (password_generation_agent_ && |
| 224 password_generation_agent_->FocusedNodeHasChanged(node)) { | 217 password_generation_agent_->FocusedNodeHasChanged(node)) { |
| 225 is_popup_possibly_visible_ = true; | 218 is_popup_possibly_visible_ = true; |
| 226 return; | 219 return; |
| 227 } | 220 } |
| 228 | 221 |
| 229 if (node.isNull() || !node.isElementNode()) | 222 if (node.isNull() || !node.isElementNode()) |
| 230 return; | 223 return; |
| 231 | 224 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 // parsed form. | 716 // parsed form. |
| 724 if (frame && !frame->parent() && !frame->isLoading()) { | 717 if (frame && !frame->parent() && !frame->isLoading()) { |
| 725 ProcessForms(*frame); | 718 ProcessForms(*frame); |
| 726 password_autofill_agent_->OnDynamicFormsSeen(frame); | 719 password_autofill_agent_->OnDynamicFormsSeen(frame); |
| 727 return; | 720 return; |
| 728 } | 721 } |
| 729 } | 722 } |
| 730 } | 723 } |
| 731 | 724 |
| 732 } // namespace autofill | 725 } // namespace autofill |
| OLD | NEW |