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

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: Created 8 years 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: 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..b78ac38469ae9076c07b5f12a427111f7d583f49
--- /dev/null
+++ b/cc/test/fake_video_frame_provider.h
@@ -0,0 +1,36 @@
+// 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"
enne (OOO) 2013/01/02 20:30:39 Same question here about whether this should be in
danakj 2013/01/02 20:45:00 Same answer, I think the Web* thing is supposed to
+
+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_

Powered by Google App Engine
This is Rietveld 408576698