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

Side by Side Diff: cc/test/fake_video_frame_provider.h

Issue 214543011: Initialize cc::VideoFrameProviderClientImpl::active_video_layer_ to NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: EXPECT_EQ() Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_ 5 #ifndef CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
6 #define CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_ 6 #define CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
7 7
8 #include "cc/layers/video_frame_provider.h" 8 #include "cc/layers/video_frame_provider.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 // Fake video frame provider that always provides the same VideoFrame. 13 // Fake video frame provider that always provides the same VideoFrame.
14 class FakeVideoFrameProvider : public VideoFrameProvider { 14 class FakeVideoFrameProvider : public VideoFrameProvider {
15 public: 15 public:
16 FakeVideoFrameProvider(); 16 FakeVideoFrameProvider();
17 virtual ~FakeVideoFrameProvider(); 17 virtual ~FakeVideoFrameProvider();
18 18
19 virtual void SetVideoFrameProviderClient(Client* client) OVERRIDE; 19 virtual void SetVideoFrameProviderClient(Client* client) OVERRIDE;
20 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE; 20 virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() OVERRIDE;
21 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&) 21 virtual void PutCurrentFrame(const scoped_refptr<media::VideoFrame>&)
22 OVERRIDE {} 22 OVERRIDE {}
23 23
24 Client* client() { return client_; }
25
24 void set_frame(const scoped_refptr<media::VideoFrame>& frame) { 26 void set_frame(const scoped_refptr<media::VideoFrame>& frame) {
25 frame_ = frame; 27 frame_ = frame;
26 } 28 }
27 29
28 private: 30 private:
29 scoped_refptr<media::VideoFrame> frame_; 31 scoped_refptr<media::VideoFrame> frame_;
30 Client* client_; 32 Client* client_;
31 }; 33 };
32 34
33 } // namespace cc 35 } // namespace cc
34 36
35 #endif // CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_ 37 #endif // CC_TEST_FAKE_VIDEO_FRAME_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698