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

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: Nit 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..f01348f6de08eca3fade0cf7901dd62e51ecb4d2
--- /dev/null
+++ b/components/autofill/browser/test_autofill_driver.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
Ilya Sherman 2013/06/12 00:07:46 ultra nit: Please omit the "(c)"
blundell 2013/06/12 16:29:37 Done.
+// 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:
+ TestAutofillDriver(content::WebContents* web_contents);
Ilya Sherman 2013/06/12 00:07:46 nit: Please mark this as explicit.
blundell 2013/06/12 16:29:37 Done.
+ 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_

Powered by Google App Engine
This is Rietveld 408576698