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

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

Issue 22926033: Enable password saving for dynamic password forms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits fixed Created 7 years, 3 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 | 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 base::string16 substring = value; 600 base::string16 substring = value;
601 substring = substring.substr(0, node->maxLength()); 601 substring = substring.substr(0, node->maxLength());
602 602
603 node->setEditingValue(substring); 603 node->setEditingValue(substring);
604 } 604 }
605 605
606 void AutofillAgent::HideAutofillUI() { 606 void AutofillAgent::HideAutofillUI() {
607 Send(new AutofillHostMsg_HideAutofillUI(routing_id())); 607 Send(new AutofillHostMsg_HideAutofillUI(routing_id()));
608 } 608 }
609 609
610 // TODO(isherman): Decide if we want to support autofill with AJAX. 610 // TODO(isherman): Decide if we want to support non-password autofill with AJAX.
611 void AutofillAgent::didAssociateFormControls( 611 void AutofillAgent::didAssociateFormControls(
612 const WebKit::WebVector<WebKit::WebNode>& nodes) { 612 const WebKit::WebVector<WebKit::WebNode>& nodes) {
613 for (size_t i = 0; i < nodes.size(); ++i) {
614 WebKit::WebFrame* frame = nodes[i].document().frame();
615 // Only monitors dynamic forms created in the top frame. Dynamic forms
616 // inserted in iframes are not captured yet.
617 if (!frame->parent()) {
618 password_autofill_agent_->OnDynamicFormsSeen(frame);
619 return;
620 }
621 }
613 } 622 }
614 623
615 } // namespace autofill 624 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/test/data/password/dynamic_password_form.html ('k') | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698