| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // If WillSubmitForm message had not been sent for this form, send it. | 238 // If WillSubmitForm message had not been sent for this form, send it. |
| 239 if (!submitted_forms_.count(form_data)) { | 239 if (!submitted_forms_.count(form_data)) { |
| 240 Send(new AutofillHostMsg_WillSubmitForm(routing_id(), form_data, | 240 Send(new AutofillHostMsg_WillSubmitForm(routing_id(), form_data, |
| 241 base::TimeTicks::Now())); | 241 base::TimeTicks::Now())); |
| 242 } | 242 } |
| 243 | 243 |
| 244 Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data)); | 244 Send(new AutofillHostMsg_FormSubmitted(routing_id(), form_data)); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void AutofillAgent::DidChangeScrollOffset() { | 247 void AutofillAgent::DidChangeScrollOffset() { |
| 248 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 249 switches::kEnableAccessorySuggestionView)) { |
| 250 return; |
| 251 } |
| 248 HidePopup(); | 252 HidePopup(); |
| 249 } | 253 } |
| 250 | 254 |
| 251 void AutofillAgent::FocusedNodeChanged(const WebNode& node) { | 255 void AutofillAgent::FocusedNodeChanged(const WebNode& node) { |
| 252 HidePopup(); | 256 HidePopup(); |
| 253 | 257 |
| 254 if (node.isNull() || !node.isElementNode()) | 258 if (node.isNull() || !node.isElementNode()) |
| 255 return; | 259 return; |
| 256 | 260 |
| 257 WebElement web_element = node.toConst<WebElement>(); | 261 WebElement web_element = node.toConst<WebElement>(); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 787 |
| 784 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { | 788 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { |
| 785 // No-op. Don't delete |this|. | 789 // No-op. Don't delete |this|. |
| 786 } | 790 } |
| 787 | 791 |
| 788 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { | 792 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { |
| 789 agent_->FocusChangeComplete(); | 793 agent_->FocusChangeComplete(); |
| 790 } | 794 } |
| 791 | 795 |
| 792 } // namespace autofill | 796 } // namespace autofill |
| OLD | NEW |