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

Unified Diff: cc/test/fake_video_frame_provider.cc

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_provider.h ('k') | cc/test/fake_web_graphics_context_3d.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_video_frame_provider.cc
diff --git a/cc/test/fake_video_frame_provider.cc b/cc/test/fake_video_frame_provider.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bf0a3cf9bf4b390d5615ca1c166d2689814239fa
--- /dev/null
+++ b/cc/test/fake_video_frame_provider.cc
@@ -0,0 +1,25 @@
+// 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.
+
+#include "cc/test/fake_video_frame_provider.h"
+
+namespace cc {
+
+FakeVideoFrameProvider::FakeVideoFrameProvider()
+ : frame_(NULL), client_(NULL) {}
+
+FakeVideoFrameProvider::~FakeVideoFrameProvider() {
+ if (client_)
+ client_->stopUsingProvider();
+}
+
+void FakeVideoFrameProvider::setVideoFrameProviderClient(Client* client) {
+ client_ = client;
+}
+
+WebKit::WebVideoFrame* FakeVideoFrameProvider::getCurrentFrame() {
+ return frame_;
+}
+
+} // namespace cc
« no previous file with comments | « cc/test/fake_video_frame_provider.h ('k') | cc/test/fake_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698