Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 1082183002: Android - Introduce "keyboard accessory" for Autofill suggestions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698