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

Side by Side Diff: chrome/renderer/autofill/password_generation_manager.cc

Issue 10458018: This CL does the following: (1) Pass the max_length attribute to the password generator; (2) Update… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a windows UI bug. Created 8 years, 6 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
« no previous file with comments | « chrome/common/autofill_messages.h ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/autofill/password_generation_manager.h" 5 #include "chrome/renderer/autofill/password_generation_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/autofill_messages.h" 8 #include "chrome/common/autofill_messages.h"
9 #include "content/public/renderer/render_view.h" 9 #include "content/public/renderer/render_view.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void PasswordGenerationManager::handleClick(WebKit::WebInputElement& element) { 107 void PasswordGenerationManager::handleClick(WebKit::WebInputElement& element) {
108 gfx::Rect rect(element.decorationElementFor(this).boundsInViewportSpace()); 108 gfx::Rect rect(element.decorationElementFor(this).boundsInViewportSpace());
109 webkit::forms::PasswordForm* password_form( 109 webkit::forms::PasswordForm* password_form(
110 webkit::forms::PasswordFormDomManager::CreatePasswordForm( 110 webkit::forms::PasswordFormDomManager::CreatePasswordForm(
111 element.form())); 111 element.form()));
112 if (password_form) { 112 if (password_form) {
113 Send(new AutofillHostMsg_ShowPasswordGenerationPopup(routing_id(), 113 Send(new AutofillHostMsg_ShowPasswordGenerationPopup(routing_id(),
114 rect, 114 rect,
115 element.maxLength(),
115 *password_form)); 116 *password_form));
116 } 117 }
117 } 118 }
118 119
119 void PasswordGenerationManager::willDetach( 120 void PasswordGenerationManager::willDetach(
120 const WebKit::WebInputElement& element) { 121 const WebKit::WebInputElement& element) {
121 // No implementation 122 // No implementation
122 } 123 }
123 124
124 bool PasswordGenerationManager::OnMessageReceived(const IPC::Message& message) { 125 bool PasswordGenerationManager::OnMessageReceived(const IPC::Message& message) {
(...skipping 14 matching lines...) Expand all
139 it->setValue(password); 140 it->setValue(password);
140 it->setAutofilled(true); 141 it->setAutofilled(true);
141 } 142 }
142 } 143 }
143 144
144 void PasswordGenerationManager::OnPasswordGenerationEnabled(bool enabled) { 145 void PasswordGenerationManager::OnPasswordGenerationEnabled(bool enabled) {
145 enabled_ = enabled; 146 enabled_ = enabled;
146 } 147 }
147 148
148 } // namespace autofill 149 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/common/autofill_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698