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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
11 #include "components/autofill/content/common/autofill_messages.h" | 11 #include "components/autofill/content/common/autofill_messages.h" |
12 #include "components/autofill/core/browser/autofill_client.h" | 12 #include "components/autofill/core/browser/autofill_client.h" |
13 #include "components/autofill/core/browser/autofill_external_delegate.h" | 13 #include "components/autofill/core/browser/autofill_external_delegate.h" |
14 #include "components/autofill/core/browser/autofill_manager.h" | 14 #include "components/autofill/core/browser/autofill_manager.h" |
15 #include "components/autofill/core/browser/form_structure.h" | 15 #include "components/autofill/core/browser/form_structure.h" |
16 #include "components/autofill/core/common/autofill_switches.h" | 16 #include "components/autofill/core/common/autofill_switches.h" |
17 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
19 #include "content/public/browser/navigation_controller.h" | 19 #include "content/public/browser/navigation_controller.h" |
20 #include "content/public/browser/navigation_details.h" | 20 #include "content/public/browser/navigation_details.h" |
21 #include "content/public/browser/render_frame_host.h" | 21 #include "content/public/browser/render_frame_host.h" |
22 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
23 #include "content/public/browser/render_widget_host_view.h" | 23 #include "content/public/browser/render_widget_host_view.h" |
24 #include "content/public/browser/site_instance.h" | 24 #include "content/public/browser/site_instance.h" |
25 #include "content/public/browser/storage_partition.h" | 25 #include "content/public/browser/storage_partition.h" |
26 #include "content/public/common/service_registry.h" | |
27 #include "ipc/ipc_message_macros.h" | 26 #include "ipc/ipc_message_macros.h" |
| 27 #include "services/shell/public/cpp/interface_provider.h" |
28 #include "ui/gfx/geometry/size_f.h" | 28 #include "ui/gfx/geometry/size_f.h" |
29 | 29 |
30 namespace autofill { | 30 namespace autofill { |
31 | 31 |
32 ContentAutofillDriver::ContentAutofillDriver( | 32 ContentAutofillDriver::ContentAutofillDriver( |
33 content::RenderFrameHost* render_frame_host, | 33 content::RenderFrameHost* render_frame_host, |
34 AutofillClient* client, | 34 AutofillClient* client, |
35 const std::string& app_locale, | 35 const std::string& app_locale, |
36 AutofillManager::AutofillDownloadManagerState enable_download_manager) | 36 AutofillManager::AutofillDownloadManagerState enable_download_manager) |
37 : render_frame_host_(render_frame_host), | 37 : render_frame_host_(render_frame_host), |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 void ContentAutofillDriver::NotifyFirstUserGestureObservedInTab() { | 231 void ContentAutofillDriver::NotifyFirstUserGestureObservedInTab() { |
232 ConnectToMojoAutofillAgentIfNeeded(); | 232 ConnectToMojoAutofillAgentIfNeeded(); |
233 mojo_autofill_agent_->FirstUserGestureObservedInTab(); | 233 mojo_autofill_agent_->FirstUserGestureObservedInTab(); |
234 } | 234 } |
235 | 235 |
236 void ContentAutofillDriver::ConnectToMojoAutofillAgentIfNeeded() { | 236 void ContentAutofillDriver::ConnectToMojoAutofillAgentIfNeeded() { |
237 if (mojo_autofill_agent_) | 237 if (mojo_autofill_agent_) |
238 return; | 238 return; |
239 | 239 |
240 render_frame_host_->GetServiceRegistry()->ConnectToRemoteService( | 240 render_frame_host_->GetRemoteInterfaces()->GetInterface( |
241 mojo::GetProxy(&mojo_autofill_agent_)); | 241 &mojo_autofill_agent_); |
242 } | 242 } |
243 | 243 |
244 } // namespace autofill | 244 } // namespace autofill |
OLD | NEW |