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

Unified Diff: components/autofill/browser/test_autofill_driver.h

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to fix conflict 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/browser/test_autofill_driver.h
diff --git a/components/autofill/browser/test_autofill_driver.h b/components/autofill/browser/test_autofill_driver.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ad09db91b8833386889c1beede6622aab992259
--- /dev/null
+++ b/components/autofill/browser/test_autofill_driver.h
@@ -0,0 +1,34 @@
+// 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_BROWSER_TEST_AUTOFILL_DRIVER_H_
+#define COMPONENTS_AUTOFILL_BROWSER_TEST_AUTOFILL_DRIVER_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "components/autofill/browser/autofill_driver.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace autofill {
+
+// This class is only for easier writing of tests. All pure virtual functions
+// have been given empty methods.
+// TODO(blundell): Eliminate this class being a WebContentsObserver once
+// autofill shared code no longer needs knowledge of WebContents.
+class TestAutofillDriver : public AutofillDriver,
+ public content::WebContentsObserver {
+ public:
+ explicit TestAutofillDriver(content::WebContents* web_contents);
+ virtual ~TestAutofillDriver();
+
+ // AutofillDriver implementation.
+ virtual content::WebContents* GetWebContents() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestAutofillDriver);
+};
+
+} // namespace autofill
+
+#endif // COMPONENTS_AUTOFILL_BROWSER_TEST_AUTOFILL_DRIVER_H_
« no previous file with comments | « components/autofill/browser/autofill_metrics_unittest.cc ('k') | components/autofill/browser/test_autofill_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698