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/autofill/content/browser/content_autofill_driver.h" | 5 #include "components/autofill/content/browser/content_autofill_driver.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
9 #include "components/autofill/content/common/autofill_messages.h" | 9 #include "components/autofill/content/common/autofill_messages.h" |
10 #include "components/autofill/core/browser/autofill_external_delegate.h" | 10 #include "components/autofill/core/browser/autofill_external_delegate.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 void ContentAutofillDriver::RendererShouldAcceptPasswordAutofillSuggestion( | 136 void ContentAutofillDriver::RendererShouldAcceptPasswordAutofillSuggestion( |
137 const base::string16& username) { | 137 const base::string16& username) { |
138 if (!RendererIsAvailable()) | 138 if (!RendererIsAvailable()) |
139 return; | 139 return; |
140 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 140 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
141 host->Send(new AutofillMsg_AcceptPasswordAutofillSuggestion( | 141 host->Send(new AutofillMsg_AcceptPasswordAutofillSuggestion( |
142 host->GetRoutingID(), username)); | 142 host->GetRoutingID(), username)); |
143 } | 143 } |
144 | 144 |
| 145 void ContentAutofillDriver::RendererShouldPreviewPassword( |
| 146 const base::string16& username) { |
| 147 if (!RendererIsAvailable()) |
| 148 return; |
| 149 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 150 host->Send( |
| 151 new AutofillMsg_PreviewPassword(host->GetRoutingID(), username)); |
| 152 } |
| 153 |
145 void ContentAutofillDriver::RendererShouldClearFilledForm() { | 154 void ContentAutofillDriver::RendererShouldClearFilledForm() { |
146 if (!RendererIsAvailable()) | 155 if (!RendererIsAvailable()) |
147 return; | 156 return; |
148 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 157 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
149 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); | 158 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); |
150 } | 159 } |
151 | 160 |
152 void ContentAutofillDriver::RendererShouldClearPreviewedForm() { | 161 void ContentAutofillDriver::RendererShouldClearPreviewedForm() { |
153 if (!RendererIsAvailable()) | 162 if (!RendererIsAvailable()) |
154 return; | 163 return; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 void ContentAutofillDriver::NavigationEntryCommitted( | 244 void ContentAutofillDriver::NavigationEntryCommitted( |
236 const content::LoadCommittedDetails& load_details) { | 245 const content::LoadCommittedDetails& load_details) { |
237 autofill_manager_->delegate()->HideAutofillPopup(); | 246 autofill_manager_->delegate()->HideAutofillPopup(); |
238 } | 247 } |
239 | 248 |
240 void ContentAutofillDriver::WasHidden() { | 249 void ContentAutofillDriver::WasHidden() { |
241 autofill_manager_->delegate()->HideAutofillPopup(); | 250 autofill_manager_->delegate()->HideAutofillPopup(); |
242 } | 251 } |
243 | 252 |
244 } // namespace autofill | 253 } // namespace autofill |
OLD | NEW |