[Android] Introduce new UMA action for when user copies Image URL from context menu
[chromium-blink-merge.git] / cc / test / fake_video_frame_provider.cc
blob01455446af0d367c6345af0e03a25c1ee9e5382d
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), put_current_frame_count_(0) {
13 FakeVideoFrameProvider::~FakeVideoFrameProvider() {
14 if (client_)
15 client_->StopUsingProvider();
18 bool FakeVideoFrameProvider::UpdateCurrentFrame(base::TimeTicks deadline_min,
19 base::TimeTicks deadline_max) {
20 return HasCurrentFrame();
23 void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) {
24 client_ = client;
27 bool FakeVideoFrameProvider::HasCurrentFrame() {
28 return frame_;
31 scoped_refptr<media::VideoFrame> FakeVideoFrameProvider::GetCurrentFrame() {
32 return frame_;
35 void FakeVideoFrameProvider::PutCurrentFrame() {
36 ++put_current_frame_count_;
39 } // namespace cc