Index: chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h |
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h b/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..08a6a7a5d1f2cb45c7c0cb064dce52145fd44309 |
--- /dev/null |
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2014 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 CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_TEST_UTIL_H_ |
+#define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_TEST_UTIL_H_ |
+ |
+#include "base/callback.h" |
+#include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" |
+ |
+class MockMediaGalleriesDialog : public MediaGalleriesDialog { |
+ public: |
+ typedef base::Callback<void(int update_count)> DialogDestroyedCallback; |
+ |
+ explicit MockMediaGalleriesDialog(const DialogDestroyedCallback& callback); |
+ virtual ~MockMediaGalleriesDialog(); |
+ |
+ // MediaGalleriesDialog implementation. |
+ virtual void UpdateGalleries() OVERRIDE; |
+ |
+ // Number up times UpdateResults has been called. |
+ int update_count(); |
Lei Zhang
2014/06/06 07:03:10
nit: const method
vandebo (ex-Chrome)
2014/06/06 17:43:30
Done.
|
+ |
+ private: |
+ // MediaGalleriesDialog implementation. |
+ virtual void AcceptDialogForTesting() OVERRIDE; |
+ |
+ int update_count_; |
+ |
+ DialogDestroyedCallback dialog_destroyed_callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MockMediaGalleriesDialog); |
+}; |
+ |
+#endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_TEST_UTIL_H_ |