Index: ui/ozone/platform/dri/test/mock_surface_generator.h |
diff --git a/ui/ozone/platform/dri/test/mock_surface_generator.h b/ui/ozone/platform/dri/test/mock_surface_generator.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9b77f8620db503b39400766cb2a823f600d714b |
--- /dev/null |
+++ b/ui/ozone/platform/dri/test/mock_surface_generator.h |
@@ -0,0 +1,40 @@ |
+// 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 UI_OZONE_PLATFORM_DRI_TEST_MOCK_SURFACE_GENERATOR_H_ |
+#define UI_OZONE_PLATFORM_DRI_TEST_MOCK_SURFACE_GENERATOR_H_ |
+ |
+#include <vector> |
+ |
+#include "ui/ozone/platform/dri/test/mock_dri_surface.h" |
+ |
+namespace gfx { |
+class Size; |
+} |
+ |
+namespace ui { |
+ |
+class DriWrapper; |
+ |
+class MockSurfaceGenerator : public ScanoutSurfaceGenerator { |
+ public: |
+ MockSurfaceGenerator(DriWrapper* dri); |
+ virtual ~MockSurfaceGenerator(); |
+ |
+ std::vector<MockDriSurface*> surfaces() const { return surfaces_; } |
+ |
+ // ScanoutSurfaceGenerator: |
+ virtual ScanoutSurface* Create(const gfx::Size& size) OVERRIDE; |
+ |
+ private: |
+ DriWrapper* dri_; // Not owned. |
+ |
+ std::vector<MockDriSurface*> surfaces_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MockSurfaceGenerator); |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_OZONE_PLATFORM_DRI_TEST_MOCK_SURFACE_GENERATOR_H_ |