Index: components/autofill/content/browser/autofill_driver_impl.h |
diff --git a/components/autofill/content/browser/autofill_driver_impl.h b/components/autofill/content/browser/autofill_driver_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1d7e93b1be1a01ed3dc26d31cb84b001839e81c2 |
--- /dev/null |
+++ b/components/autofill/content/browser/autofill_driver_impl.h |
@@ -0,0 +1,69 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |
+#define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |
+ |
+#include <string> |
+ |
+#include "base/supports_user_data.h" |
+#include "components/autofill/browser/autofill_driver.h" |
+#include "components/autofill/browser/autofill_manager.h" |
+#include "content/public/browser/web_contents_observer.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace IPC { |
+class Message; |
+} |
+ |
+namespace autofill { |
+ |
+class AutofillContext; |
+class AutofillExternalDelegate; |
+class AutofillManager; |
+class AutofillManagerDelegate; |
+ |
+// Class that drives autofill flow in the browser process based on |
+// communication from the renderer and from the external world. There is one |
+// instance per WebContents. |
+class AutofillDriverImpl : public AutofillDriver, |
+ public content::WebContentsObserver, |
+ public base::SupportsUserData::Data { |
+ public: |
+ static void CreateForWebContentsAndDelegate( |
+ content::WebContents* contents, |
+ autofill::AutofillManagerDelegate* delegate, |
+ const std::string& app_locale, |
+ AutofillManager::AutofillDownloadManagerState enable_download_manager, |
+ bool enable_native_UI); |
Ilya Sherman
2013/06/12 00:07:46
nit: Please name this variable using hacker_case,
blundell
2013/06/12 16:29:37
Done.
|
+ static AutofillDriverImpl* FromWebContents(content::WebContents* contents); |
+ |
+ // AutofillDriver: |
+ virtual content::WebContents* GetWebContents() OVERRIDE; |
+ |
+ private: |
+ AutofillDriverImpl( |
+ content::WebContents* web_contents, |
+ autofill::AutofillManagerDelegate* delegate, |
+ const std::string& app_locale, |
+ AutofillManager::AutofillDownloadManagerState enable_download_manager, |
+ bool enable_native_UI); |
+ virtual ~AutofillDriverImpl(); |
+ |
+ // content::WebContentsObserver: |
+ virtual void DidNavigateMainFrame( |
+ const content::LoadCommittedDetails& details, |
+ const content::FrameNavigateParams& params) OVERRIDE; |
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ |
+ AutofillManager* autofill_manager_; |
+ AutofillExternalDelegate* autofill_external_delegate_; |
Ilya Sherman
2013/06/12 00:07:46
Please document these, including comments about th
blundell
2013/06/12 16:29:37
Done. Removed the autofill_external_delegate_ inst
|
+}; |
+ |
+} // namespace autofill |
+ |
+#endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |