| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/password_manager/content/browser/content_password_manager_d
river.h" | 5 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
| 6 | 6 |
| 7 #include "components/autofill/content/browser/content_autofill_driver.h" | 7 #include "components/autofill/content/browser/content_autofill_driver.h" |
| 8 #include "components/autofill/content/common/autofill_messages.h" | 8 #include "components/autofill/content/common/autofill_messages.h" |
| 9 #include "components/autofill/core/common/form_data.h" | 9 #include "components/autofill/core/common/form_data.h" |
| 10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void ContentPasswordManagerDriver::AcceptPasswordAutofillSuggestion( | 57 void ContentPasswordManagerDriver::AcceptPasswordAutofillSuggestion( |
| 58 const base::string16& username, | 58 const base::string16& username, |
| 59 const base::string16& password) { | 59 const base::string16& password) { |
| 60 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 60 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 61 host->Send( | 61 host->Send( |
| 62 new AutofillMsg_AcceptPasswordAutofillSuggestion(host->GetRoutingID(), | 62 new AutofillMsg_AcceptPasswordAutofillSuggestion(host->GetRoutingID(), |
| 63 username, | 63 username, |
| 64 password)); | 64 password)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ContentPasswordManagerDriver::PreviewPasswordAutofillSuggestion( |
| 68 const base::string16& username, |
| 69 const base::string16& password) { |
| 70 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 71 host->Send( |
| 72 new AutofillMsg_PreviewPasswordAutofillSuggestion(host->GetRoutingID(), |
| 73 username, |
| 74 password)); |
| 75 } |
| 76 |
| 77 void ContentPasswordManagerDriver::ClearPasswordPreviewedForm() { |
| 78 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 79 host->Send( |
| 80 new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); |
| 81 } |
| 82 |
| 67 bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() { | 83 bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() { |
| 68 DCHECK(web_contents()); | 84 DCHECK(web_contents()); |
| 69 content::NavigationEntry* entry = | 85 content::NavigationEntry* entry = |
| 70 web_contents()->GetController().GetLastCommittedEntry(); | 86 web_contents()->GetController().GetLastCommittedEntry(); |
| 71 if (!entry) { | 87 if (!entry) { |
| 72 NOTREACHED(); | 88 NOTREACHED(); |
| 73 return false; | 89 return false; |
| 74 } | 90 } |
| 75 | 91 |
| 76 return net::IsCertStatusError(entry->GetSSL().cert_status); | 92 return net::IsCertStatusError(entry->GetSSL().cert_status); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return handled; | 145 return handled; |
| 130 } | 146 } |
| 131 | 147 |
| 132 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { | 148 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { |
| 133 autofill::ContentAutofillDriver* driver = | 149 autofill::ContentAutofillDriver* driver = |
| 134 autofill::ContentAutofillDriver::FromWebContents(web_contents()); | 150 autofill::ContentAutofillDriver::FromWebContents(web_contents()); |
| 135 return driver ? driver->autofill_manager() : NULL; | 151 return driver ? driver->autofill_manager() : NULL; |
| 136 } | 152 } |
| 137 | 153 |
| 138 } // namespace password_manager | 154 } // namespace password_manager |
| OLD | NEW |