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

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

Issue 492043003: Fill on account select in the password manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit tests Created 6 years 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 | Annotate | Revision Log
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return; 228 return;
229 229
230 WebElement web_element = node.toConst<WebElement>(); 230 WebElement web_element = node.toConst<WebElement>();
231 231
232 if (!web_element.document().frame()) 232 if (!web_element.document().frame())
233 return; 233 return;
234 234
235 const WebInputElement* element = toWebInputElement(&web_element); 235 const WebInputElement* element = toWebInputElement(&web_element);
236 236
237 if (!element || !element->isEnabled() || element->isReadOnly() || 237 if (!element || !element->isEnabled() || element->isReadOnly() ||
238 !element->isTextField() || element->isPasswordField()) 238 !element->isTextField())
239 return; 239 return;
240 240
241 element_ = *element; 241 element_ = *element;
242 } 242 }
243 243
244 void AutofillAgent::OrientationChangeEvent() { 244 void AutofillAgent::OrientationChangeEvent() {
245 HidePopup(); 245 HidePopup();
246 } 246 }
247 247
248 void AutofillAgent::Resized() { 248 void AutofillAgent::Resized() {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 bool datalist_only, 568 bool datalist_only,
569 bool show_full_suggestion_list, 569 bool show_full_suggestion_list,
570 bool show_password_suggestions_only) { 570 bool show_password_suggestions_only) {
571 if (!element.isEnabled() || element.isReadOnly()) 571 if (!element.isEnabled() || element.isReadOnly())
572 return; 572 return;
573 if (!datalist_only && !element.suggestedValue().isEmpty()) 573 if (!datalist_only && !element.suggestedValue().isEmpty())
574 return; 574 return;
575 575
576 const WebInputElement* input_element = toWebInputElement(&element); 576 const WebInputElement* input_element = toWebInputElement(&element);
577 if (input_element) { 577 if (input_element) {
578 if (!input_element->isTextField() || input_element->isPasswordField()) 578 if (!input_element->isTextField())
579 return; 579 return;
580 if (!datalist_only && !input_element->suggestedValue().isEmpty()) 580 if (!datalist_only && !input_element->suggestedValue().isEmpty())
581 return; 581 return;
582 } else { 582 } else {
583 DCHECK(IsTextAreaElement(element)); 583 DCHECK(IsTextAreaElement(element));
584 if (!element.toConst<WebTextAreaElement>().suggestedValue().isEmpty()) 584 if (!element.toConst<WebTextAreaElement>().suggestedValue().isEmpty())
585 return; 585 return;
586 } 586 }
587 587
588 // Don't attempt to autofill with values that are too large or if filling 588 // Don't attempt to autofill with values that are too large or if filling
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 ProcessForms(*frame); 745 ProcessForms(*frame);
746 password_autofill_agent_->OnDynamicFormsSeen(frame); 746 password_autofill_agent_->OnDynamicFormsSeen(frame);
747 if (password_generation_agent_) 747 if (password_generation_agent_)
748 password_generation_agent_->OnDynamicFormsSeen(frame); 748 password_generation_agent_->OnDynamicFormsSeen(frame);
749 return; 749 return;
750 } 750 }
751 } 751 }
752 } 752 }
753 753
754 } // namespace autofill 754 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/common/autofill_messages.h ('k') | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698