Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: components/autofill/content/browser/autofill_driver_impl.h

Issue 17225008: Eliminate AutofillExternalDelegate being a WebContentsUserData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
index 9b8a1077da065e2eba2a1c03766e9b220e8056d1..ffce5effb0c6b8e155c949371df090a65ef40d9b 100644
--- a/components/autofill/content/browser/autofill_driver_impl.h
+++ b/components/autofill/content/browser/autofill_driver_impl.h
@@ -7,8 +7,10 @@
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "components/autofill/browser/autofill_driver.h"
+#include "components/autofill/browser/autofill_external_delegate.h"
#include "components/autofill/browser/autofill_manager.h"
#include "content/public/browser/web_contents_observer.h"
@@ -23,7 +25,6 @@ class Message;
namespace autofill {
class AutofillContext;
-class AutofillExternalDelegate;
class AutofillManagerDelegate;
// Class that drives autofill flow in the browser process based on
@@ -44,6 +45,15 @@ class AutofillDriverImpl : public AutofillDriver,
// AutofillDriver:
virtual content::WebContents* GetWebContents() OVERRIDE;
+ AutofillExternalDelegate* autofill_external_delegate() {
+ return autofill_external_delegate_.get();
+ }
+
+ // Sets the external delegate to |delegate| both within this class and in the
+ // shared Autofill code. Takes ownership of |delegate|.
+ void SetAutofillExternalDelegate(
+ scoped_ptr<AutofillExternalDelegate> delegate);
+
AutofillManager* autofill_manager() { return &autofill_manager_; }
private:
@@ -61,6 +71,10 @@ class AutofillDriverImpl : public AutofillDriver,
const content::FrameNavigateParams& params) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ // AutofillExternalDelegate instance that this object instantiates in the
+ // case where the autofill native UI is enabled.
+ scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_;
+
// AutofillManager instance via which this object drives the shared Autofill
// code.
AutofillManager autofill_manager_;
« no previous file with comments | « components/autofill/browser/autofill_external_delegate.cc ('k') | components/autofill/content/browser/autofill_driver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698