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

Side by Side Diff: components/autofill/content/browser/content_autofill_driver.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: Address gcasto's comments. 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 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 void ContentAutofillDriver::RendererShouldAcceptDataListSuggestion( 127 void ContentAutofillDriver::RendererShouldAcceptDataListSuggestion(
128 const base::string16& value) { 128 const base::string16& value) {
129 if (!RendererIsAvailable()) 129 if (!RendererIsAvailable())
130 return; 130 return;
131 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 131 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
132 host->Send( 132 host->Send(
133 new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), value)); 133 new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), value));
134 } 134 }
135 135
136 void ContentAutofillDriver::RendererShouldAcceptPasswordAutofillSuggestion(
137 const base::string16& username) {
138 if (!RendererIsAvailable())
139 return;
140 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
141 host->Send(new AutofillMsg_AcceptPasswordAutofillSuggestion(
142 host->GetRoutingID(), username));
143 }
144
145 void ContentAutofillDriver::RendererShouldClearFilledForm() { 136 void ContentAutofillDriver::RendererShouldClearFilledForm() {
146 if (!RendererIsAvailable()) 137 if (!RendererIsAvailable())
147 return; 138 return;
148 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 139 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
149 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); 140 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID()));
150 } 141 }
151 142
152 void ContentAutofillDriver::RendererShouldClearPreviewedForm() { 143 void ContentAutofillDriver::RendererShouldClearPreviewedForm() {
153 if (!RendererIsAvailable()) 144 if (!RendererIsAvailable())
154 return; 145 return;
(...skipping 29 matching lines...) Expand all
184 AutofillManager::OnDidPreviewAutofillFormData) 175 AutofillManager::OnDidPreviewAutofillFormData)
185 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData, 176 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData,
186 autofill_manager_.get(), 177 autofill_manager_.get(),
187 AutofillManager::OnDidFillAutofillFormData) 178 AutofillManager::OnDidFillAutofillFormData)
188 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing, 179 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing,
189 autofill_manager_.get(), 180 autofill_manager_.get(),
190 AutofillManager::OnDidEndTextFieldEditing) 181 AutofillManager::OnDidEndTextFieldEditing)
191 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup, 182 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup,
192 autofill_manager_.get(), 183 autofill_manager_.get(),
193 AutofillManager::OnHidePopup) 184 AutofillManager::OnHidePopup)
194 IPC_MESSAGE_FORWARD(AutofillHostMsg_AddPasswordFormMapping,
195 autofill_manager_.get(),
196 AutofillManager::OnAddPasswordFormMapping)
197 IPC_MESSAGE_FORWARD(AutofillHostMsg_ShowPasswordSuggestions,
198 autofill_manager_.get(),
199 AutofillManager::OnShowPasswordSuggestions)
200 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList, 185 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList,
201 autofill_manager_.get(), 186 autofill_manager_.get(),
202 AutofillManager::OnSetDataList) 187 AutofillManager::OnSetDataList)
203 IPC_MESSAGE_FORWARD(AutofillHostMsg_RequestAutocomplete, 188 IPC_MESSAGE_FORWARD(AutofillHostMsg_RequestAutocomplete,
204 &request_autocomplete_manager_, 189 &request_autocomplete_manager_,
205 RequestAutocompleteManager::OnRequestAutocomplete) 190 RequestAutocompleteManager::OnRequestAutocomplete)
206 IPC_MESSAGE_UNHANDLED(handled = false) 191 IPC_MESSAGE_UNHANDLED(handled = false)
207 IPC_END_MESSAGE_MAP() 192 IPC_END_MESSAGE_MAP()
208 return handled; 193 return handled;
209 } 194 }
(...skipping 14 matching lines...) Expand all
224 void ContentAutofillDriver::NavigationEntryCommitted( 209 void ContentAutofillDriver::NavigationEntryCommitted(
225 const content::LoadCommittedDetails& load_details) { 210 const content::LoadCommittedDetails& load_details) {
226 autofill_manager_->delegate()->HideAutofillPopup(); 211 autofill_manager_->delegate()->HideAutofillPopup();
227 } 212 }
228 213
229 void ContentAutofillDriver::WasHidden() { 214 void ContentAutofillDriver::WasHidden() {
230 autofill_manager_->delegate()->HideAutofillPopup(); 215 autofill_manager_->delegate()->HideAutofillPopup();
231 } 216 }
232 217
233 } // namespace autofill 218 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698