Setup a experiment to enable background tracing.
[chromium-blink-merge.git] / cc / test / fake_video_frame_provider.cc
blobb979b0c95e098646a2d8e5302c33b1c6f76e074a
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/test/fake_video_frame_provider.h"
7 namespace cc {
9 FakeVideoFrameProvider::FakeVideoFrameProvider()
10 : frame_(NULL), client_(NULL) {}
12 FakeVideoFrameProvider::~FakeVideoFrameProvider() {
13 if (client_)
14 client_->StopUsingProvider();
17 bool FakeVideoFrameProvider::UpdateCurrentFrame(base::TimeTicks deadline_min,
18 base::TimeTicks deadline_max) {
19 return false;
22 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) {
23 client_ = client;
26 bool FakeVideoFrameProvider::HasCurrentFrame() {
27 return frame_;
30 scoped_refptr<media::VideoFrame> FakeVideoFrameProvider::GetCurrentFrame() {
31 return frame_;
34 } // namespace cc