| OLD | NEW |
| 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" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // frame has been delivered. | 37 // frame has been delivered. |
| 38 void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame); | 38 void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame); |
| 39 | 39 |
| 40 void CompleteGetSupportedFormats(); | 40 void CompleteGetSupportedFormats(); |
| 41 | 41 |
| 42 const media::VideoCaptureFormat& start_format() const { return format_; } | 42 const media::VideoCaptureFormat& start_format() const { return format_; } |
| 43 int max_requested_height() const { return max_requested_height_; } | 43 int max_requested_height() const { return max_requested_height_; } |
| 44 int max_requested_width() const { return max_requested_width_; } | 44 int max_requested_width() const { return max_requested_width_; } |
| 45 double max_requested_frame_rate() const { return max_requested_frame_rate_; } | 45 double max_requested_frame_rate() const { return max_requested_frame_rate_; } |
| 46 | 46 |
| 47 virtual void SetMutedState(bool muted_state) OVERRIDE { | 47 virtual void OnFrameRateCallback(bool muted_state) OVERRIDE { |
| 48 MediaStreamVideoSource::SetMutedState(muted_state); | 48 MediaStreamVideoSource::OnFrameRateCallback(muted_state); |
| 49 DoSetMutedState(muted_state); | 49 DoSetMutedState(muted_state); |
| 50 } | 50 } |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 void DeliverVideoFrameOnIO(const scoped_refptr<media::VideoFrame>& frame, | 53 void DeliverVideoFrameOnIO(const scoped_refptr<media::VideoFrame>& frame, |
| 54 media::VideoCaptureFormat format, | 54 media::VideoCaptureFormat format, |
| 55 const base::TimeTicks& estimated_capture_time, | 55 const base::TimeTicks& estimated_capture_time, |
| 56 const VideoCaptureDeliverFrameCB& frame_callback); | 56 const VideoCaptureDeliverFrameCB& frame_callback); |
| 57 | 57 |
| 58 // Implements MediaStreamVideoSource. | 58 // Implements MediaStreamVideoSource. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 bool attempted_to_start_; | 76 bool attempted_to_start_; |
| 77 VideoCaptureDeviceFormatsCB formats_callback_; | 77 VideoCaptureDeviceFormatsCB formats_callback_; |
| 78 VideoCaptureDeliverFrameCB frame_callback_; | 78 VideoCaptureDeliverFrameCB frame_callback_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); | 80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace content | 83 } // namespace content |
| 84 | 84 |
| 85 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ | 85 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| OLD | NEW |