| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_autofill_manager.h" | 5 #include "chrome/renderer/autofill/password_autofill_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/common/autofill_messages.h" | 10 #include "chrome/common/autofill_messages.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // PageClickListener implementation: | 398 // PageClickListener implementation: |
| 399 | 399 |
| 400 bool PasswordAutofillManager::InputElementClicked( | 400 bool PasswordAutofillManager::InputElementClicked( |
| 401 const WebKit::WebInputElement& element, | 401 const WebKit::WebInputElement& element, |
| 402 bool was_focused, | 402 bool was_focused, |
| 403 bool is_focused) { | 403 bool is_focused) { |
| 404 // TODO(jcivelli): http://crbug.com/51644 Implement behavior. | 404 // TODO(jcivelli): http://crbug.com/51644 Implement behavior. |
| 405 return false; | 405 return false; |
| 406 } | 406 } |
| 407 | 407 |
| 408 bool PasswordAutofillManager::InputElementLostFocus() { |
| 409 return false; |
| 410 } |
| 411 |
| 408 void PasswordAutofillManager::OnFillPasswordForm( | 412 void PasswordAutofillManager::OnFillPasswordForm( |
| 409 const webkit_glue::PasswordFormFillData& form_data) { | 413 const webkit_glue::PasswordFormFillData& form_data) { |
| 410 FormElementsList forms; | 414 FormElementsList forms; |
| 411 // We own the FormElements* in forms. | 415 // We own the FormElements* in forms. |
| 412 FindFormElements(render_view()->GetWebView(), form_data.basic_data, &forms); | 416 FindFormElements(render_view()->GetWebView(), form_data.basic_data, &forms); |
| 413 FormElementsList::iterator iter; | 417 FormElementsList::iterator iter; |
| 414 for (iter = forms.begin(); iter != forms.end(); ++iter) { | 418 for (iter = forms.begin(); iter != forms.end(); ++iter) { |
| 415 scoped_ptr<FormElements> form_elements(*iter); | 419 scoped_ptr<FormElements> form_elements(*iter); |
| 416 | 420 |
| 417 // If wait_for_username is true, we don't want to initially fill the form | 421 // If wait_for_username is true, we don't want to initially fill the form |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); | 586 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); |
| 583 if (iter == login_to_password_info_.end()) | 587 if (iter == login_to_password_info_.end()) |
| 584 return false; | 588 return false; |
| 585 | 589 |
| 586 *found_input = input; | 590 *found_input = input; |
| 587 *found_password = iter->second; | 591 *found_password = iter->second; |
| 588 return true; | 592 return true; |
| 589 } | 593 } |
| 590 | 594 |
| 591 } // namespace autofill | 595 } // namespace autofill |
| OLD | NEW |