| OLD | NEW |
| 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 "components/autofill/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.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "components/autofill/common/autofill_messages.h" | 11 #include "components/autofill/common/autofill_messages.h" |
| 12 #include "components/autofill/common/form_field_data.h" | 12 #include "components/autofill/common/form_field_data.h" |
| 13 #include "components/autofill/common/password_form_fill_data.h" | 13 #include "components/autofill/common/password_form_fill_data.h" |
| 14 #include "components/autofill/renderer/form_autofill_util.h" | 14 #include "components/autofill/content/renderer/form_autofill_util.h" |
| 15 #include "content/public/common/password_form.h" | 15 #include "content/public/common/password_form.h" |
| 16 #include "content/public/renderer/password_form_conversion_utils.h" | 16 #include "content/public/renderer/password_form_conversion_utils.h" |
| 17 #include "content/public/renderer/render_view.h" | 17 #include "content/public/renderer/render_view.h" |
| 18 #include "third_party/WebKit/public/platform/WebVector.h" | |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 26 #include "third_party/WebKit/public/platform/WebVector.h" |
| 27 #include "ui/base/keycodes/keyboard_codes.h" | 27 #include "ui/base/keycodes/keyboard_codes.h" |
| 28 | 28 |
| 29 namespace autofill { | 29 namespace autofill { |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // The size above which we stop triggering autocomplete. | 32 // The size above which we stop triggering autocomplete. |
| 33 static const size_t kMaximumTextSizeForAutocomplete = 1000; | 33 static const size_t kMaximumTextSizeForAutocomplete = 1000; |
| 34 | 34 |
| 35 // Maps element names to the actual elements to simplify form filling. | 35 // Maps element names to the actual elements to simplify form filling. |
| 36 typedef std::map<base::string16, WebKit::WebInputElement> | 36 typedef std::map<base::string16, WebKit::WebInputElement> |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); | 677 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); |
| 678 if (iter == login_to_password_info_.end()) | 678 if (iter == login_to_password_info_.end()) |
| 679 return false; | 679 return false; |
| 680 | 680 |
| 681 *found_input = input; | 681 *found_input = input; |
| 682 *found_password = iter->second; | 682 *found_password = iter->second; |
| 683 return true; | 683 return true; |
| 684 } | 684 } |
| 685 | 685 |
| 686 } // namespace autofill | 686 } // namespace autofill |
| OLD | NEW |