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_client.h" | 10 #include "components/autofill/core/browser/autofill_client.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 void ContentAutofillDriver::PingRenderer() { | 107 void ContentAutofillDriver::PingRenderer() { |
108 if (!RendererIsAvailable()) | 108 if (!RendererIsAvailable()) |
109 return; | 109 return; |
110 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 110 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
111 host->Send(new AutofillMsg_Ping(host->GetRoutingID())); | 111 host->Send(new AutofillMsg_Ping(host->GetRoutingID())); |
112 } | 112 } |
113 | 113 |
114 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer( | 114 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer( |
115 const std::vector<FormStructure*>& forms) { | 115 const std::vector<FormStructure*>& forms) { |
116 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 116 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
117 switches::kShowAutofillTypePredictions)) | 117 switches::kShowAutofillTypePredictions)) |
118 return; | 118 return; |
119 | 119 |
120 if (!RendererIsAvailable()) | 120 if (!RendererIsAvailable()) |
121 return; | 121 return; |
122 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 122 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
123 | 123 |
124 std::vector<FormDataPredictions> type_predictions; | 124 std::vector<FormDataPredictions> type_predictions; |
125 FormStructure::GetFieldTypePredictions(forms, &type_predictions); | 125 FormStructure::GetFieldTypePredictions(forms, &type_predictions); |
126 host->Send(new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(), | 126 host->Send(new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(), |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 void ContentAutofillDriver::NavigationEntryCommitted( | 226 void ContentAutofillDriver::NavigationEntryCommitted( |
227 const content::LoadCommittedDetails& load_details) { | 227 const content::LoadCommittedDetails& load_details) { |
228 autofill_manager_->client()->HideAutofillPopup(); | 228 autofill_manager_->client()->HideAutofillPopup(); |
229 } | 229 } |
230 | 230 |
231 void ContentAutofillDriver::WasHidden() { | 231 void ContentAutofillDriver::WasHidden() { |
232 autofill_manager_->client()->HideAutofillPopup(); | 232 autofill_manager_->client()->HideAutofillPopup(); |
233 } | 233 } |
234 | 234 |
235 } // namespace autofill | 235 } // namespace autofill |
OLD | NEW |