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

Unified Diff: chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h

Issue 318733003: Use the media galleries controller interface for the scan result dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more const Created 6 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: 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..1f2d5a4ebae5ee48a9054a79892e326c008ce3fe
--- /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() const;
+
+ 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_

Powered by Google App Engine
This is Rietveld 408576698