Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: components/autofill/content/browser/autofill_driver_impl.cc

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor PasswordAutofillManager in password_manager component. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/browser/autofill_driver_impl.h" 5 #include "components/autofill/content/browser/autofill_driver_impl.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( 134 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion(
135 const base::string16& value) { 135 const base::string16& value) {
136 if (!RendererIsAvailable()) 136 if (!RendererIsAvailable())
137 return; 137 return;
138 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 138 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
139 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), 139 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(),
140 value)); 140 value));
141 } 141 }
142 142
143 void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion(
144 const base::string16& username) {
145 if (!RendererIsAvailable())
146 return;
147 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
148 host->Send(
149 new AutofillMsg_AcceptPasswordAutofillSuggestion(host->GetRoutingID(),
150 username));
151 }
152
153 void AutofillDriverImpl::RendererShouldClearFilledForm() { 143 void AutofillDriverImpl::RendererShouldClearFilledForm() {
154 if (!RendererIsAvailable()) 144 if (!RendererIsAvailable())
155 return; 145 return;
156 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 146 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
157 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); 147 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID()));
158 } 148 }
159 149
160 void AutofillDriverImpl::RendererShouldClearPreviewedForm() { 150 void AutofillDriverImpl::RendererShouldClearPreviewedForm() {
161 if (!RendererIsAvailable()) 151 if (!RendererIsAvailable())
162 return; 152 return;
(...skipping 29 matching lines...) Expand all
192 autofill_manager_.get(), 182 autofill_manager_.get(),
193 AutofillManager::OnDidPreviewAutofillFormData) 183 AutofillManager::OnDidPreviewAutofillFormData)
194 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData, 184 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData,
195 autofill_manager_.get(), 185 autofill_manager_.get(),
196 AutofillManager::OnDidFillAutofillFormData) 186 AutofillManager::OnDidFillAutofillFormData)
197 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing, 187 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing,
198 autofill_manager_.get(), 188 autofill_manager_.get(),
199 AutofillManager::OnDidEndTextFieldEditing) 189 AutofillManager::OnDidEndTextFieldEditing)
200 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup, autofill_manager_.get(), 190 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup, autofill_manager_.get(),
201 AutofillManager::OnHidePopup) 191 AutofillManager::OnHidePopup)
202 IPC_MESSAGE_FORWARD(AutofillHostMsg_AddPasswordFormMapping,
203 autofill_manager_.get(),
204 AutofillManager::OnAddPasswordFormMapping)
205 IPC_MESSAGE_FORWARD(AutofillHostMsg_ShowPasswordSuggestions,
206 autofill_manager_.get(),
207 AutofillManager::OnShowPasswordSuggestions)
208 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList, autofill_manager_.get(), 192 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList, autofill_manager_.get(),
209 AutofillManager::OnSetDataList) 193 AutofillManager::OnSetDataList)
210 IPC_MESSAGE_FORWARD(AutofillHostMsg_RequestAutocomplete, 194 IPC_MESSAGE_FORWARD(AutofillHostMsg_RequestAutocomplete,
211 &request_autocomplete_manager_, 195 &request_autocomplete_manager_,
212 RequestAutocompleteManager::OnRequestAutocomplete) 196 RequestAutocompleteManager::OnRequestAutocomplete)
213 IPC_MESSAGE_UNHANDLED(handled = false) 197 IPC_MESSAGE_UNHANDLED(handled = false)
214 IPC_END_MESSAGE_MAP() 198 IPC_END_MESSAGE_MAP()
215 return handled; 199 return handled;
216 } 200 }
217 201
(...skipping 13 matching lines...) Expand all
231 void AutofillDriverImpl::NavigationEntryCommitted( 215 void AutofillDriverImpl::NavigationEntryCommitted(
232 const content::LoadCommittedDetails& load_details) { 216 const content::LoadCommittedDetails& load_details) {
233 autofill_manager_->delegate()->HideAutofillPopup(); 217 autofill_manager_->delegate()->HideAutofillPopup();
234 } 218 }
235 219
236 void AutofillDriverImpl::WasHidden() { 220 void AutofillDriverImpl::WasHidden() {
237 autofill_manager_->delegate()->HideAutofillPopup(); 221 autofill_manager_->delegate()->HideAutofillPopup();
238 } 222 }
239 223
240 } // namespace autofill 224 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698