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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 UMA_HISTOGRAM_ENUMERATION("PasswordManager.OtherPossibleUsernamesUsage", | 921 UMA_HISTOGRAM_ENUMERATION("PasswordManager.OtherPossibleUsernamesUsage", |
922 usernames_usage_, OTHER_POSSIBLE_USERNAMES_MAX); | 922 usernames_usage_, OTHER_POSSIBLE_USERNAMES_MAX); |
923 usernames_usage_ = NOTHING_TO_AUTOFILL; | 923 usernames_usage_ = NOTHING_TO_AUTOFILL; |
924 } | 924 } |
925 } | 925 } |
926 | 926 |
927 void PasswordAutofillAgent::DidStopLoading() { | 927 void PasswordAutofillAgent::DidStopLoading() { |
928 did_stop_loading_ = true; | 928 did_stop_loading_ = true; |
929 } | 929 } |
930 | 930 |
931 void PasswordAutofillAgent::FrameDetached(blink::WebFrame* frame) { | 931 void PasswordAutofillAgent::FrameDetached() { |
932 if (frame == render_frame()->GetWebFrame()) | 932 FrameClosing(); |
933 FrameClosing(); | |
934 } | 933 } |
935 | 934 |
936 void PasswordAutofillAgent::WillSendSubmitEvent( | 935 void PasswordAutofillAgent::WillSendSubmitEvent( |
937 const blink::WebFormElement& form) { | 936 const blink::WebFormElement& form) { |
938 // Forms submitted via XHR are not seen by WillSubmitForm if the default | 937 // Forms submitted via XHR are not seen by WillSubmitForm if the default |
939 // onsubmit handler is overridden. Such submission first gets detected in | 938 // onsubmit handler is overridden. Such submission first gets detected in |
940 // DidStartProvisionalLoad, which no longer knows about the particular form, | 939 // DidStartProvisionalLoad, which no longer knows about the particular form, |
941 // and uses the candidate stored in |provisionally_saved_form_|. | 940 // and uses the candidate stored in |provisionally_saved_form_|. |
942 // | 941 // |
943 // User-typed password will get stored to |provisionally_saved_form_| in | 942 // User-typed password will get stored to |provisionally_saved_form_| in |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 | 1310 |
1312 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { | 1311 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { |
1313 agent_->DidStopLoading(); | 1312 agent_->DidStopLoading(); |
1314 } | 1313 } |
1315 | 1314 |
1316 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: | 1315 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: |
1317 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { | 1316 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { |
1318 agent_->LegacyDidStartProvisionalLoad(navigated_frame); | 1317 agent_->LegacyDidStartProvisionalLoad(navigated_frame); |
1319 } | 1318 } |
1320 | 1319 |
1321 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::FrameDetached( | |
1322 blink::WebFrame* frame) { | |
1323 agent_->FrameDetached(frame); | |
1324 } | |
1325 | |
1326 } // namespace autofill | 1320 } // namespace autofill |
OLD | NEW |