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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 void ContentAutofillDriver::PingRenderer() { | 82 void ContentAutofillDriver::PingRenderer() { |
83 if (!RendererIsAvailable()) | 83 if (!RendererIsAvailable()) |
84 return; | 84 return; |
85 render_frame_host_->Send( | 85 render_frame_host_->Send( |
86 new AutofillMsg_Ping(render_frame_host_->GetRoutingID())); | 86 new AutofillMsg_Ping(render_frame_host_->GetRoutingID())); |
87 } | 87 } |
88 | 88 |
89 void ContentAutofillDriver::DetectAccountCreationForms( | 89 void ContentAutofillDriver::PropagateAutofillPredictions( |
90 const std::vector<FormStructure*>& forms) { | 90 const std::vector<FormStructure*>& forms) { |
91 autofill_manager_->client()->DetectAccountCreationForms(render_frame_host_, | 91 autofill_manager_->client()->PropagateAutofillPredictions(render_frame_host_, |
92 forms); | 92 forms); |
93 } | 93 } |
94 | 94 |
95 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer( | 95 void ContentAutofillDriver::SendAutofillTypePredictionsToRenderer( |
96 const std::vector<FormStructure*>& forms) { | 96 const std::vector<FormStructure*>& forms) { |
97 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 97 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
98 switches::kShowAutofillTypePredictions)) | 98 switches::kShowAutofillTypePredictions)) |
99 return; | 99 return; |
100 | 100 |
101 if (!RendererIsAvailable()) | 101 if (!RendererIsAvailable()) |
102 return; | 102 return; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 autofill_manager_->Reset(); | 204 autofill_manager_->Reset(); |
205 } | 205 } |
206 | 206 |
207 void ContentAutofillDriver::SetAutofillManager( | 207 void ContentAutofillDriver::SetAutofillManager( |
208 scoped_ptr<AutofillManager> manager) { | 208 scoped_ptr<AutofillManager> manager) { |
209 autofill_manager_ = manager.Pass(); | 209 autofill_manager_ = manager.Pass(); |
210 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); | 210 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); |
211 } | 211 } |
212 | 212 |
213 } // namespace autofill | 213 } // namespace autofill |
OLD | NEW |