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

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

Issue 286243002: Mac: Autofill should not immediately request access to address book. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing abstract method override to a test class. Created 6 years, 6 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 host->Send( 101 host->Send(
102 new AutofillMsg_FillForm(host->GetRoutingID(), query_id, data)); 102 new AutofillMsg_FillForm(host->GetRoutingID(), query_id, data));
103 break; 103 break;
104 case FORM_DATA_ACTION_PREVIEW: 104 case FORM_DATA_ACTION_PREVIEW:
105 host->Send( 105 host->Send(
106 new AutofillMsg_PreviewForm(host->GetRoutingID(), query_id, data)); 106 new AutofillMsg_PreviewForm(host->GetRoutingID(), query_id, data));
107 break; 107 break;
108 } 108 }
109 } 109 }
110 110
111 void ContentAutofillDriver::PingRenderer() {
112 if (!RendererIsAvailable())
113 return;
114 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
115 host->Send(new AutofillMsg_Ping(host->GetRoutingID()));
116 }
117
111 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer( 118 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer(
112 const std::vector<FormStructure*>& forms) { 119 const std::vector<FormStructure*>& forms) {
113 if (!CommandLine::ForCurrentProcess()->HasSwitch( 120 if (!CommandLine::ForCurrentProcess()->HasSwitch(
114 switches::kShowAutofillTypePredictions)) 121 switches::kShowAutofillTypePredictions))
115 return; 122 return;
116 123
117 if (!RendererIsAvailable()) 124 if (!RendererIsAvailable())
118 return; 125 return;
119 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 126 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
120 127
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 AutofillManager::OnFormSubmitted) 181 AutofillManager::OnFormSubmitted)
175 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange, 182 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange,
176 autofill_manager_.get(), 183 autofill_manager_.get(),
177 AutofillManager::OnTextFieldDidChange) 184 AutofillManager::OnTextFieldDidChange)
178 IPC_MESSAGE_FORWARD(AutofillHostMsg_QueryFormFieldAutofill, 185 IPC_MESSAGE_FORWARD(AutofillHostMsg_QueryFormFieldAutofill,
179 autofill_manager_.get(), 186 autofill_manager_.get(),
180 AutofillManager::OnQueryFormFieldAutofill) 187 AutofillManager::OnQueryFormFieldAutofill)
181 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidPreviewAutofillFormData, 188 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidPreviewAutofillFormData,
182 autofill_manager_.get(), 189 autofill_manager_.get(),
183 AutofillManager::OnDidPreviewAutofillFormData) 190 AutofillManager::OnDidPreviewAutofillFormData)
191 IPC_MESSAGE_FORWARD(AutofillHostMsg_PingAck,
192 &autofill_external_delegate_,
193 AutofillExternalDelegate::OnPingAck)
184 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData, 194 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidFillAutofillFormData,
185 autofill_manager_.get(), 195 autofill_manager_.get(),
186 AutofillManager::OnDidFillAutofillFormData) 196 AutofillManager::OnDidFillAutofillFormData)
187 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing, 197 IPC_MESSAGE_FORWARD(AutofillHostMsg_DidEndTextFieldEditing,
188 autofill_manager_.get(), 198 autofill_manager_.get(),
189 AutofillManager::OnDidEndTextFieldEditing) 199 AutofillManager::OnDidEndTextFieldEditing)
190 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup, 200 IPC_MESSAGE_FORWARD(AutofillHostMsg_HidePopup,
191 autofill_manager_.get(), 201 autofill_manager_.get(),
192 AutofillManager::OnHidePopup) 202 AutofillManager::OnHidePopup)
193 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList, 203 IPC_MESSAGE_FORWARD(AutofillHostMsg_SetDataList,
(...skipping 26 matching lines...) Expand all
220 void ContentAutofillDriver::NavigationEntryCommitted( 230 void ContentAutofillDriver::NavigationEntryCommitted(
221 const content::LoadCommittedDetails& load_details) { 231 const content::LoadCommittedDetails& load_details) {
222 autofill_manager_->delegate()->HideAutofillPopup(); 232 autofill_manager_->delegate()->HideAutofillPopup();
223 } 233 }
224 234
225 void ContentAutofillDriver::WasHidden() { 235 void ContentAutofillDriver::WasHidden() {
226 autofill_manager_->delegate()->HideAutofillPopup(); 236 autofill_manager_->delegate()->HideAutofillPopup();
227 } 237 }
228 238
229 } // namespace autofill 239 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/content_autofill_driver.h ('k') | components/autofill/content/common/autofill_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698