Index: components/autofill/content/browser/content_autofill_driver.h |
diff --git a/components/autofill/content/browser/content_autofill_driver.h b/components/autofill/content/browser/content_autofill_driver.h |
index f0ddceb63d920461c5023064124bb6e4b2d53aa8..aa3120df61099ad3d7a2ba8bf045c16d5e97cb04 100644 |
--- a/components/autofill/content/browser/content_autofill_driver.h |
+++ b/components/autofill/content/browser/content_autofill_driver.h |
@@ -25,6 +25,7 @@ class RenderFrameHost; |
namespace autofill { |
class AutofillClient; |
+class AutofillProvider; |
// Class that drives autofill flow in the browser process based on |
// communication from the renderer and from the external world. There is one |
@@ -37,7 +38,8 @@ class ContentAutofillDriver : public AutofillDriver, |
content::RenderFrameHost* render_frame_host, |
AutofillClient* client, |
const std::string& app_locale, |
- AutofillManager::AutofillDownloadManagerState enable_download_manager); |
+ AutofillManager::AutofillDownloadManagerState enable_download_manager, |
+ AutofillProvider* provider); |
~ContentAutofillDriver() override; |
// Gets the driver for |render_frame_host|. |
@@ -94,10 +96,10 @@ class ContentAutofillDriver : public AutofillDriver, |
void DidNavigateFrame(content::NavigationHandle* navigation_handle); |
AutofillExternalDelegate* autofill_external_delegate() { |
- return &autofill_external_delegate_; |
+ return autofill_external_delegate_.get(); |
} |
- AutofillManager* autofill_manager() { return autofill_manager_.get(); } |
+ AutofillManager* autofill_manager() { return autofill_manager_; } |
content::RenderFrameHost* render_frame_host() { return render_frame_host_; } |
const mojom::AutofillAgentPtr& GetAutofillAgent(); |
@@ -123,13 +125,18 @@ class ContentAutofillDriver : public AutofillDriver, |
// always be non-NULL and valid for lifetime of |this|. |
content::RenderFrameHost* const render_frame_host_; |
- // AutofillManager instance via which this object drives the shared Autofill |
+ // AutofillHandler instance via which this object drives the shared Autofill |
// code. |
- std::unique_ptr<AutofillManager> autofill_manager_; |
+ std::unique_ptr<AutofillHandler> autofill_handler_; |
+ |
+ // The pointer to autofill_handler_ if it is AutofillManager instance. |
+ // TODO: unify autofill_handler_ and autofill_manager_ to a single pointer to |
+ // a common root. |
+ AutofillManager* autofill_manager_; |
// AutofillExternalDelegate instance that this object instantiates in the |
// case where the Autofill native UI is enabled. |
- AutofillExternalDelegate autofill_external_delegate_; |
+ std::unique_ptr<AutofillExternalDelegate> autofill_external_delegate_; |
KeyPressHandlerManager key_press_handler_manager_; |