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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 UMA_HISTOGRAM_ENUMERATION("PasswordManager.OtherPossibleUsernamesUsage", | 980 UMA_HISTOGRAM_ENUMERATION("PasswordManager.OtherPossibleUsernamesUsage", |
981 usernames_usage_, OTHER_POSSIBLE_USERNAMES_MAX); | 981 usernames_usage_, OTHER_POSSIBLE_USERNAMES_MAX); |
982 usernames_usage_ = NOTHING_TO_AUTOFILL; | 982 usernames_usage_ = NOTHING_TO_AUTOFILL; |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 void PasswordAutofillAgent::DidStopLoading() { | 986 void PasswordAutofillAgent::DidStopLoading() { |
987 did_stop_loading_ = true; | 987 did_stop_loading_ = true; |
988 } | 988 } |
989 | 989 |
990 void PasswordAutofillAgent::FrameDetached(blink::WebFrame* frame) { | 990 void PasswordAutofillAgent::FrameDetached() { |
991 if (frame == render_frame()->GetWebFrame()) | 991 FrameClosing(); |
992 FrameClosing(); | |
993 } | 992 } |
994 | 993 |
995 void PasswordAutofillAgent::WillSendSubmitEvent( | 994 void PasswordAutofillAgent::WillSendSubmitEvent( |
996 const blink::WebFormElement& form) { | 995 const blink::WebFormElement& form) { |
997 // Forms submitted via XHR are not seen by WillSubmitForm if the default | 996 // Forms submitted via XHR are not seen by WillSubmitForm if the default |
998 // onsubmit handler is overridden. Such submission first gets detected in | 997 // onsubmit handler is overridden. Such submission first gets detected in |
999 // DidStartProvisionalLoad, which no longer knows about the particular form, | 998 // DidStartProvisionalLoad, which no longer knows about the particular form, |
1000 // and uses the candidate stored in |provisionally_saved_form_|. | 999 // and uses the candidate stored in |provisionally_saved_form_|. |
1001 // | 1000 // |
1002 // User-typed password will get stored to |provisionally_saved_form_| in | 1001 // User-typed password will get stored to |provisionally_saved_form_| in |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 | 1371 |
1373 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { | 1372 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { |
1374 agent_->DidStopLoading(); | 1373 agent_->DidStopLoading(); |
1375 } | 1374 } |
1376 | 1375 |
1377 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: | 1376 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: |
1378 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { | 1377 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { |
1379 agent_->LegacyDidStartProvisionalLoad(navigated_frame); | 1378 agent_->LegacyDidStartProvisionalLoad(navigated_frame); |
1380 } | 1379 } |
1381 | 1380 |
1382 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::FrameDetached( | |
1383 blink::WebFrame* frame) { | |
1384 agent_->FrameDetached(frame); | |
1385 } | |
1386 | |
1387 } // namespace autofill | 1381 } // namespace autofill |
OLD | NEW |