| 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 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/supports_user_data.h" | 11 #include "base/supports_user_data.h" |
| 12 #include "components/autofill/content/browser/key_press_handler_manager.h" | 12 #include "components/autofill/content/browser/key_press_handler_manager.h" |
| 13 #include "components/autofill/content/common/autofill_agent.mojom.h" | 13 #include "components/autofill/content/common/autofill_agent.mojom.h" |
| 14 #include "components/autofill/content/common/autofill_driver.mojom.h" | 14 #include "components/autofill/content/common/autofill_driver.mojom.h" |
| 15 #include "components/autofill/core/browser/autofill_driver.h" | 15 #include "components/autofill/core/browser/autofill_driver.h" |
| 16 #include "components/autofill/core/browser/autofill_external_delegate.h" | 16 #include "components/autofill/core/browser/autofill_external_delegate.h" |
| 17 #include "components/autofill/core/browser/autofill_manager.h" | 17 #include "components/autofill/core/browser/autofill_manager.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 18 #include "mojo/public/cpp/bindings/binding.h" |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class NavigationHandle; | 21 class NavigationHandle; |
| 22 class RenderFrameHost; | 22 class RenderFrameHost; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace autofill { | 25 namespace autofill { |
| 26 | 26 |
| 27 class AutofillClient; | 27 class AutofillClient; |
| 28 class AutofillProvider; |
| 28 | 29 |
| 29 // Class that drives autofill flow in the browser process based on | 30 // Class that drives autofill flow in the browser process based on |
| 30 // communication from the renderer and from the external world. There is one | 31 // communication from the renderer and from the external world. There is one |
| 31 // instance per RenderFrameHost. | 32 // instance per RenderFrameHost. |
| 32 class ContentAutofillDriver : public AutofillDriver, | 33 class ContentAutofillDriver : public AutofillDriver, |
| 33 public mojom::AutofillDriver, | 34 public mojom::AutofillDriver, |
| 34 public KeyPressHandlerManager::Delegate { | 35 public KeyPressHandlerManager::Delegate { |
| 35 public: | 36 public: |
| 36 ContentAutofillDriver( | 37 ContentAutofillDriver( |
| 37 content::RenderFrameHost* render_frame_host, | 38 content::RenderFrameHost* render_frame_host, |
| 38 AutofillClient* client, | 39 AutofillClient* client, |
| 39 const std::string& app_locale, | 40 const std::string& app_locale, |
| 40 AutofillManager::AutofillDownloadManagerState enable_download_manager); | 41 AutofillManager::AutofillDownloadManagerState enable_download_manager, |
| 42 AutofillProvider* provider); |
| 41 ~ContentAutofillDriver() override; | 43 ~ContentAutofillDriver() override; |
| 42 | 44 |
| 43 // Gets the driver for |render_frame_host|. | 45 // Gets the driver for |render_frame_host|. |
| 44 static ContentAutofillDriver* GetForRenderFrameHost( | 46 static ContentAutofillDriver* GetForRenderFrameHost( |
| 45 content::RenderFrameHost* render_frame_host); | 47 content::RenderFrameHost* render_frame_host); |
| 46 | 48 |
| 47 void BindRequest(mojom::AutofillDriverRequest request); | 49 void BindRequest(mojom::AutofillDriverRequest request); |
| 48 | 50 |
| 49 // AutofillDriver: | 51 // AutofillDriver: |
| 50 bool IsIncognito() const override; | 52 bool IsIncognito() const override; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 KeyPressHandlerManager key_press_handler_manager_; | 137 KeyPressHandlerManager key_press_handler_manager_; |
| 136 | 138 |
| 137 mojo::Binding<mojom::AutofillDriver> binding_; | 139 mojo::Binding<mojom::AutofillDriver> binding_; |
| 138 | 140 |
| 139 mojom::AutofillAgentPtr autofill_agent_; | 141 mojom::AutofillAgentPtr autofill_agent_; |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace autofill | 144 } // namespace autofill |
| 143 | 145 |
| 144 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ | 146 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ |
| OLD | NEW |