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

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

Issue 695953003: [Password Autofill] Disable one click popup on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 6 years, 1 month 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
« no previous file with comments | « chrome/renderer/autofill/password_autofill_agent_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 void AutofillAgent::FormControlElementClicked( 312 void AutofillAgent::FormControlElementClicked(
313 const WebFormControlElement& element, 313 const WebFormControlElement& element,
314 bool was_focused) { 314 bool was_focused) {
315 const WebInputElement* input_element = toWebInputElement(&element); 315 const WebInputElement* input_element = toWebInputElement(&element);
316 if (!input_element && !IsTextAreaElement(element)) 316 if (!input_element && !IsTextAreaElement(element))
317 return; 317 return;
318 318
319 bool show_full_suggestion_list = element.isAutofilled() || was_focused; 319 bool show_full_suggestion_list = element.isAutofilled() || was_focused;
320 bool show_password_suggestions_only = !was_focused; 320 bool show_password_suggestions_only = !was_focused;
321 ShowSuggestions(element, 321
322 true, 322 // TODO(gcasto): Remove after crbug.com/423464 has been fixed.
323 false, 323 bool show_suggestions = true;
324 true, 324 #if defined(OS_ANDROID)
325 false, 325 show_suggestions = was_focused;
326 show_full_suggestion_list, 326 #endif
327 show_password_suggestions_only); 327
328 if (show_suggestions) {
329 ShowSuggestions(element,
330 true,
331 false,
332 true,
333 false,
334 show_full_suggestion_list,
335 show_password_suggestions_only);
336 }
328 } 337 }
329 338
330 void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) { 339 void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) {
331 password_autofill_agent_->TextFieldDidEndEditing(element); 340 password_autofill_agent_->TextFieldDidEndEditing(element);
332 has_shown_autofill_popup_for_current_edit_ = false; 341 has_shown_autofill_popup_for_current_edit_ = false;
333 Send(new AutofillHostMsg_DidEndTextFieldEditing(routing_id())); 342 Send(new AutofillHostMsg_DidEndTextFieldEditing(routing_id()));
334 } 343 }
335 344
336 void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) { 345 void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) {
337 if (ignore_text_changes_) 346 if (ignore_text_changes_)
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ProcessForms(*frame); 746 ProcessForms(*frame);
738 password_autofill_agent_->OnDynamicFormsSeen(frame); 747 password_autofill_agent_->OnDynamicFormsSeen(frame);
739 if (password_generation_agent_) 748 if (password_generation_agent_)
740 password_generation_agent_->OnDynamicFormsSeen(frame); 749 password_generation_agent_->OnDynamicFormsSeen(frame);
741 return; 750 return;
742 } 751 }
743 } 752 }
744 } 753 }
745 754
746 } // namespace autofill 755 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/password_autofill_agent_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698