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

Unified Diff: cc/test/fake_video_frame_provider.h

Issue 11662003: cc: Put context-loss tests in layer_tree_host_unittest_context.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80cols Created 7 years, 12 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
« no previous file with comments | « cc/test/fake_video_frame.cc ('k') | cc/test/fake_video_frame_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_video_frame_provider.h
diff --git a/cc/test/fake_video_frame_provider.h b/cc/test/fake_video_frame_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..f44dee63c6a93b31029600d8ad1641f0ddc5c54e
--- /dev/null
+++ b/cc/test/fake_video_frame_provider.h
@@ -0,0 +1,35 @@
+// Copyright 2012 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 CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
+#define CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/test/fake_video_frame.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrameProvider.h"
+
+namespace cc {
+
+// Fake video frame provider that always provides the same VideoFrame.
+class FakeVideoFrameProvider: public WebKit::WebVideoFrameProvider {
+ public:
+ FakeVideoFrameProvider();
+ virtual ~FakeVideoFrameProvider();
+
+ virtual void setVideoFrameProviderClient(Client* client) OVERRIDE;
+ virtual WebKit::WebVideoFrame* getCurrentFrame() OVERRIDE;
+ virtual void putCurrentFrame(WebKit::WebVideoFrame*) OVERRIDE {}
+
+ void set_frame(FakeVideoFrame* frame) {
+ frame_ = frame;
+ }
+
+ private:
+ FakeVideoFrame* frame_;
+ Client* client_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
« no previous file with comments | « cc/test/fake_video_frame.cc ('k') | cc/test/fake_video_frame_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698