| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 void ContentAutofillDriver::RendererShouldPreviewFieldWithValue( | 140 void ContentAutofillDriver::RendererShouldPreviewFieldWithValue( |
| 141 const base::string16& value) { | 141 const base::string16& value) { |
| 142 if (!RendererIsAvailable()) | 142 if (!RendererIsAvailable()) |
| 143 return; | 143 return; |
| 144 render_frame_host_->Send(new AutofillMsg_PreviewFieldWithValue( | 144 render_frame_host_->Send(new AutofillMsg_PreviewFieldWithValue( |
| 145 render_frame_host_->GetRoutingID(), value)); | 145 render_frame_host_->GetRoutingID(), value)); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void ContentAutofillDriver::PopupHidden() { |
| 149 if (!RendererIsAvailable()) |
| 150 return; |
| 151 render_frame_host_->Send( |
| 152 new AutofillMsg_PopupHidden(render_frame_host_->GetRoutingID())); |
| 153 } |
| 154 |
| 148 bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) { | 155 bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) { |
| 149 bool handled = true; | 156 bool handled = true; |
| 150 IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message) | 157 IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message) |
| 151 IPC_MESSAGE_FORWARD(AutofillHostMsg_FirstUserGestureObserved, client_, | 158 IPC_MESSAGE_FORWARD(AutofillHostMsg_FirstUserGestureObserved, client_, |
| 152 AutofillClient::OnFirstUserGestureObserved) | 159 AutofillClient::OnFirstUserGestureObserved) |
| 153 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, | 160 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, |
| 154 autofill_manager_.get(), | 161 autofill_manager_.get(), |
| 155 AutofillManager::OnFormsSeen) | 162 AutofillManager::OnFormsSeen) |
| 156 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, | 163 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, |
| 157 autofill_manager_.get(), | 164 autofill_manager_.get(), |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 autofill_manager_->Reset(); | 202 autofill_manager_->Reset(); |
| 196 } | 203 } |
| 197 | 204 |
| 198 void ContentAutofillDriver::SetAutofillManager( | 205 void ContentAutofillDriver::SetAutofillManager( |
| 199 scoped_ptr<AutofillManager> manager) { | 206 scoped_ptr<AutofillManager> manager) { |
| 200 autofill_manager_ = manager.Pass(); | 207 autofill_manager_ = manager.Pass(); |
| 201 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); | 208 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); |
| 202 } | 209 } |
| 203 | 210 |
| 204 } // namespace autofill | 211 } // namespace autofill |
| OLD | NEW |