| 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/core/browser/autofill_external_delegate.h" | 9 #include "components/autofill/core/browser/autofill_external_delegate.h" |
| 10 #include "components/autofill/core/browser/autofill_manager.h" | 10 #include "components/autofill/core/browser/autofill_manager.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); | 142 host->Send(new AutofillMsg_ClearForm(host->GetRoutingID())); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void AutofillDriverImpl::RendererShouldClearPreviewedForm() { | 145 void AutofillDriverImpl::RendererShouldClearPreviewedForm() { |
| 146 if (!RendererIsAvailable()) | 146 if (!RendererIsAvailable()) |
| 147 return; | 147 return; |
| 148 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 148 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 149 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); | 149 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void AutofillDriverImpl::RendererShouldSetNodeText( |
| 153 const base::string16& value) { |
| 154 if (!RendererIsAvailable()) |
| 155 return; |
| 156 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 157 host->Send(new AutofillMsg_SetNodeText(host->GetRoutingID(), value)); |
| 158 } |
| 159 |
| 152 bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) { | 160 bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) { |
| 153 bool handled = true; | 161 bool handled = true; |
| 154 IPC_BEGIN_MESSAGE_MAP(AutofillDriverImpl, message) | 162 IPC_BEGIN_MESSAGE_MAP(AutofillDriverImpl, message) |
| 155 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, autofill_manager_.get(), | 163 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, autofill_manager_.get(), |
| 156 AutofillManager::OnFormsSeen) | 164 AutofillManager::OnFormsSeen) |
| 157 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, autofill_manager_.get(), | 165 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, autofill_manager_.get(), |
| 158 AutofillManager::OnFormSubmitted) | 166 AutofillManager::OnFormSubmitted) |
| 159 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange, | 167 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange, |
| 160 autofill_manager_.get(), | 168 autofill_manager_.get(), |
| 161 AutofillManager::OnTextFieldDidChange) | 169 AutofillManager::OnTextFieldDidChange) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 const content::LoadCommittedDetails& load_details) { | 220 const content::LoadCommittedDetails& load_details) { |
| 213 autofill_manager_->delegate()->HideAutofillPopup(); | 221 autofill_manager_->delegate()->HideAutofillPopup(); |
| 214 } | 222 } |
| 215 | 223 |
| 216 void AutofillDriverImpl::WasHidden() { | 224 void AutofillDriverImpl::WasHidden() { |
| 217 autofill_manager_->delegate()->HideAutofillPopup(); | 225 autofill_manager_->delegate()->HideAutofillPopup(); |
| 218 } | 226 } |
| 219 | 227 |
| 220 | 228 |
| 221 } // namespace autofill | 229 } // namespace autofill |
| OLD | NEW |