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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } | 165 } |
166 | 166 |
167 void AutofillDriverImpl::RendererShouldSetNodeText( | 167 void AutofillDriverImpl::RendererShouldSetNodeText( |
168 const base::string16& value) { | 168 const base::string16& value) { |
169 if (!RendererIsAvailable()) | 169 if (!RendererIsAvailable()) |
170 return; | 170 return; |
171 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 171 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
172 host->Send(new AutofillMsg_SetNodeText(host->GetRoutingID(), value)); | 172 host->Send(new AutofillMsg_SetNodeText(host->GetRoutingID(), value)); |
173 } | 173 } |
174 | 174 |
| 175 void AutofillDriverImpl::RendererShouldPreviewAutoCompleteNode( |
| 176 const base::string16& value) { |
| 177 if (!RendererIsAvailable()) |
| 178 return; |
| 179 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 180 host->Send(new AutofillMsg_PreviewAutoCompleteNode(host->GetRoutingID(), |
| 181 value)); |
| 182 } |
| 183 |
175 bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) { | 184 bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) { |
176 bool handled = true; | 185 bool handled = true; |
177 IPC_BEGIN_MESSAGE_MAP(AutofillDriverImpl, message) | 186 IPC_BEGIN_MESSAGE_MAP(AutofillDriverImpl, message) |
178 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, autofill_manager_.get(), | 187 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, autofill_manager_.get(), |
179 AutofillManager::OnFormsSeen) | 188 AutofillManager::OnFormsSeen) |
180 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, autofill_manager_.get(), | 189 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormSubmitted, autofill_manager_.get(), |
181 AutofillManager::OnFormSubmitted) | 190 AutofillManager::OnFormSubmitted) |
182 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange, | 191 IPC_MESSAGE_FORWARD(AutofillHostMsg_TextFieldDidChange, |
183 autofill_manager_.get(), | 192 autofill_manager_.get(), |
184 AutofillManager::OnTextFieldDidChange) | 193 AutofillManager::OnTextFieldDidChange) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void AutofillDriverImpl::NavigationEntryCommitted( | 240 void AutofillDriverImpl::NavigationEntryCommitted( |
232 const content::LoadCommittedDetails& load_details) { | 241 const content::LoadCommittedDetails& load_details) { |
233 autofill_manager_->delegate()->HideAutofillPopup(); | 242 autofill_manager_->delegate()->HideAutofillPopup(); |
234 } | 243 } |
235 | 244 |
236 void AutofillDriverImpl::WasHidden() { | 245 void AutofillDriverImpl::WasHidden() { |
237 autofill_manager_->delegate()->HideAutofillPopup(); | 246 autofill_manager_->delegate()->HideAutofillPopup(); |
238 } | 247 } |
239 | 248 |
240 } // namespace autofill | 249 } // namespace autofill |
OLD | NEW |