| OLD | NEW |
| 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/password_autofill_agent.h" | 5 #include "components/autofill/content/renderer/password_autofill_agent.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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "components/autofill/content/common/autofill_messages.h" | 12 #include "components/autofill/content/common/autofill_messages.h" |
| 13 #include "components/autofill/content/renderer/form_autofill_util.h" | 13 #include "components/autofill/content/renderer/form_autofill_util.h" |
| 14 #include "components/autofill/content/renderer/password_form_conversion_utils.h" | 14 #include "components/autofill/content/renderer/password_form_conversion_utils.h" |
| 15 #include "components/autofill/core/common/form_field_data.h" | 15 #include "components/autofill/core/common/form_field_data.h" |
| 16 #include "components/autofill/core/common/password_autofill_util.h" | 16 #include "components/autofill/core/common/password_autofill_util.h" |
| 17 #include "components/autofill/core/common/password_form.h" | 17 #include "components/autofill/core/common/password_form.h" |
| 18 #include "components/autofill/core/common/password_form_fill_data.h" | 18 #include "components/autofill/core/common/password_form_fill_data.h" |
| 19 #include "content/public/renderer/render_view.h" | 19 #include "content/public/renderer/render_view.h" |
| 20 #include "third_party/WebKit/public/platform/WebVector.h" | 20 #include "third_party/WebKit/public/platform/WebVector.h" |
| 21 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 21 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
| 22 #include "third_party/WebKit/public/web/WebDocument.h" | 22 #include "third_party/WebKit/public/web/WebDocument.h" |
| 23 #include "third_party/WebKit/public/web/WebElement.h" | 23 #include "third_party/WebKit/public/web/WebElement.h" |
| 24 #include "third_party/WebKit/public/web/WebFormElement.h" | 24 #include "third_party/WebKit/public/web/WebFormElement.h" |
| 25 #include "third_party/WebKit/public/web/WebInputEvent.h" | 25 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 26 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 26 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 27 #include "third_party/WebKit/public/web/WebNode.h" | 27 #include "third_party/WebKit/public/web/WebNode.h" |
| 28 #include "third_party/WebKit/public/web/WebNodeList.h" | 28 #include "third_party/WebKit/public/web/WebNodeList.h" |
| 29 #include "third_party/WebKit/public/web/WebPasswordFormData.h" | |
| 30 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 29 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 31 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 30 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 32 #include "third_party/WebKit/public/web/WebView.h" | 31 #include "third_party/WebKit/public/web/WebView.h" |
| 33 #include "ui/events/keycodes/keyboard_codes.h" | 32 #include "ui/events/keycodes/keyboard_codes.h" |
| 34 | 33 |
| 35 namespace autofill { | 34 namespace autofill { |
| 36 namespace { | 35 namespace { |
| 37 | 36 |
| 38 // The size above which we stop triggering autocomplete. | 37 // The size above which we stop triggering autocomplete. |
| 39 static const size_t kMaximumTextSizeForAutocomplete = 1000; | 38 static const size_t kMaximumTextSizeForAutocomplete = 1000; |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); | 895 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); |
| 897 if (iter == login_to_password_info_.end()) | 896 if (iter == login_to_password_info_.end()) |
| 898 return false; | 897 return false; |
| 899 | 898 |
| 900 *found_input = input; | 899 *found_input = input; |
| 901 *found_password = iter->second; | 900 *found_password = iter->second; |
| 902 return true; | 901 return true; |
| 903 } | 902 } |
| 904 | 903 |
| 905 } // namespace autofill | 904 } // namespace autofill |
| OLD | NEW |