| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 } else { | 958 } else { |
| 959 Send(new AutofillHostMsg_PasswordFormsParsed(routing_id(), password_forms)); | 959 Send(new AutofillHostMsg_PasswordFormsParsed(routing_id(), password_forms)); |
| 960 } | 960 } |
| 961 } | 961 } |
| 962 | 962 |
| 963 bool PasswordAutofillAgent::OnMessageReceived(const IPC::Message& message) { | 963 bool PasswordAutofillAgent::OnMessageReceived(const IPC::Message& message) { |
| 964 bool handled = true; | 964 bool handled = true; |
| 965 IPC_BEGIN_MESSAGE_MAP(PasswordAutofillAgent, message) | 965 IPC_BEGIN_MESSAGE_MAP(PasswordAutofillAgent, message) |
| 966 IPC_MESSAGE_HANDLER(AutofillMsg_FillPasswordForm, OnFillPasswordForm) | 966 IPC_MESSAGE_HANDLER(AutofillMsg_FillPasswordForm, OnFillPasswordForm) |
| 967 IPC_MESSAGE_HANDLER(AutofillMsg_SetLoggingState, OnSetLoggingState) | 967 IPC_MESSAGE_HANDLER(AutofillMsg_SetLoggingState, OnSetLoggingState) |
| 968 IPC_MESSAGE_HANDLER(AutofillMsg_AutofillUsernameDataReceived, | 968 IPC_MESSAGE_HANDLER(AutofillMsg_AutofillUsernameAndPasswordDataReceived, |
| 969 OnAutofillUsernameDataReceived) | 969 OnAutofillUsernameAndPasswordDataReceived) |
| 970 IPC_MESSAGE_UNHANDLED(handled = false) | 970 IPC_MESSAGE_UNHANDLED(handled = false) |
| 971 IPC_END_MESSAGE_MAP() | 971 IPC_END_MESSAGE_MAP() |
| 972 return handled; | 972 return handled; |
| 973 } | 973 } |
| 974 | 974 |
| 975 void PasswordAutofillAgent::DidFinishDocumentLoad() { | 975 void PasswordAutofillAgent::DidFinishDocumentLoad() { |
| 976 // The |frame| contents have been parsed, but not yet rendered. Let the | 976 // The |frame| contents have been parsed, but not yet rendered. Let the |
| 977 // PasswordManager know that forms are loaded, even though we can't yet tell | 977 // PasswordManager know that forms are loaded, even though we can't yet tell |
| 978 // whether they're visible. | 978 // whether they're visible. |
| 979 SendPasswordForms(false); | 979 SendPasswordForms(false); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 login_to_password_info_[username_element] = password_info; | 1229 login_to_password_info_[username_element] = password_info; |
| 1230 password_to_username_[password_element] = username_element; | 1230 password_to_username_[password_element] = username_element; |
| 1231 login_to_password_info_key_[username_element] = key; | 1231 login_to_password_info_key_[username_element] = key; |
| 1232 } | 1232 } |
| 1233 } | 1233 } |
| 1234 | 1234 |
| 1235 void PasswordAutofillAgent::OnSetLoggingState(bool active) { | 1235 void PasswordAutofillAgent::OnSetLoggingState(bool active) { |
| 1236 logging_state_active_ = active; | 1236 logging_state_active_ = active; |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 void PasswordAutofillAgent::OnAutofillUsernameDataReceived( | 1239 void PasswordAutofillAgent::OnAutofillUsernameAndPasswordDataReceived( |
| 1240 const FormDataFieldDataMap& predictions) { | 1240 const FormsPredictionsMap& predictions) { |
| 1241 form_predictions_ = predictions; | 1241 form_predictions_ = predictions; |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 //////////////////////////////////////////////////////////////////////////////// | 1244 //////////////////////////////////////////////////////////////////////////////// |
| 1245 // PasswordAutofillAgent, private: | 1245 // PasswordAutofillAgent, private: |
| 1246 | 1246 |
| 1247 PasswordAutofillAgent::PasswordInfo::PasswordInfo() | 1247 PasswordAutofillAgent::PasswordInfo::PasswordInfo() |
| 1248 : backspace_pressed_last(false), password_was_edited_last(false) { | 1248 : backspace_pressed_last(false), password_was_edited_last(false) { |
| 1249 } | 1249 } |
| 1250 | 1250 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { | 1430 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { |
| 1431 agent_->DidStopLoading(); | 1431 agent_->DidStopLoading(); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: | 1434 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: |
| 1435 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { | 1435 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { |
| 1436 agent_->LegacyDidStartProvisionalLoad(navigated_frame); | 1436 agent_->LegacyDidStartProvisionalLoad(navigated_frame); |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 } // namespace autofill | 1439 } // namespace autofill |
| OLD | NEW |