OLD | NEW |
---|---|
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 return; | 116 return; |
117 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 117 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
118 | 118 |
119 std::vector<FormDataPredictions> type_predictions; | 119 std::vector<FormDataPredictions> type_predictions; |
120 FormStructure::GetFieldTypePredictions(forms, &type_predictions); | 120 FormStructure::GetFieldTypePredictions(forms, &type_predictions); |
121 host->Send( | 121 host->Send( |
122 new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(), | 122 new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(), |
123 type_predictions)); | 123 type_predictions)); |
124 } | 124 } |
125 | 125 |
126 void AutofillDriverImpl::RemovePasswordAutofillSuggestion( | |
127 const PasswordForm& password_form) { | |
128 content::RenderViewHost* host = GetWebContents()->GetRenderViewHost(); | |
vabr (Chromium)
2014/04/01 16:56:08
nit: for consistency with the rest of the file, co
rchtara
2014/04/03 08:44:50
Done.
| |
129 if (!host) | |
130 return; | |
131 | |
132 host->Send(new AutofillMsg_RemovePasswordSuggestion(host->GetRoutingID(), | |
133 password_form)); | |
134 } | |
135 | |
126 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( | 136 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( |
127 const base::string16& value) { | 137 const base::string16& value) { |
128 if (!RendererIsAvailable()) | 138 if (!RendererIsAvailable()) |
129 return; | 139 return; |
130 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 140 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
131 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), | 141 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), |
132 value)); | 142 value)); |
133 } | 143 } |
134 | 144 |
135 void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( | 145 void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 void AutofillDriverImpl::NavigationEntryCommitted( | 230 void AutofillDriverImpl::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 AutofillDriverImpl::WasHidden() { | 235 void AutofillDriverImpl::WasHidden() { |
226 autofill_manager_->delegate()->HideAutofillPopup(); | 236 autofill_manager_->delegate()->HideAutofillPopup(); |
227 } | 237 } |
228 | 238 |
229 } // namespace autofill | 239 } // namespace autofill |
OLD | NEW |