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

Side by Side Diff: content/renderer/media/mock_media_stream_video_source.h

Issue 366243003: VideoTrackAdapter: Add passing frames monitor, notify MSVCS -> MSVTrack(s) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include "content/renderer/media/media_stream_video_source.h" 8 #include "content/renderer/media/media_stream_video_source.h"
9 9
10 #include "testing/gmock/include/gmock/gmock.h"
11
10 namespace content { 12 namespace content {
11 13
12 class MockMediaStreamVideoSource : public MediaStreamVideoSource { 14 class MockMediaStreamVideoSource : public MediaStreamVideoSource {
13 public: 15 public:
14 explicit MockMediaStreamVideoSource(bool manual_get_supported_formats); 16 explicit MockMediaStreamVideoSource(bool manual_get_supported_formats);
15 virtual ~MockMediaStreamVideoSource(); 17 virtual ~MockMediaStreamVideoSource();
16 18
19 MOCK_METHOD1(SetMutedState, void(bool muted_state));
20
17 // Simulate that the underlying source start successfully. 21 // Simulate that the underlying source start successfully.
18 void StartMockedSource(); 22 void StartMockedSource();
19 23
20 // Simulate that the underlying source fail to start. 24 // Simulate that the underlying source fail to start.
21 void FailToStartMockedSource(); 25 void FailToStartMockedSource();
22 26
23 // Returns true if StartSource has been called and StartMockedSource 27 // Returns true if StartSource has been called and StartMockedSource
24 // or FailToStartMockedSource has not been called. 28 // or FailToStartMockedSource has not been called.
25 bool SourceHasAttemptedToStart() { return attempted_to_start_; } 29 bool SourceHasAttemptedToStart() { return attempted_to_start_; }
26 30
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool attempted_to_start_; 68 bool attempted_to_start_;
65 VideoCaptureDeviceFormatsCB formats_callback_; 69 VideoCaptureDeviceFormatsCB formats_callback_;
66 VideoCaptureDeliverFrameCB frame_callback_; 70 VideoCaptureDeliverFrameCB frame_callback_;
67 71
68 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); 72 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource);
69 }; 73 };
70 74
71 } // namespace content 75 } // namespace content
72 76
73 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 77 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698