| 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 "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 MediaStreamVideoSource::SetMutedState(muted_state); | 48 MediaStreamVideoSource::SetMutedState(muted_state); |
| 49 DoSetMutedState(muted_state); | 49 DoSetMutedState(muted_state); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Implements MediaStreamVideoSource. | 52 // Implements MediaStreamVideoSource. |
| 53 void RequestRefreshFrame() override; | 53 void RequestRefreshFrame() override; |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 // Implements MediaStreamVideoSource. | 56 // Implements MediaStreamVideoSource. |
| 57 void StartSourceImpl( | 57 void StartSourceImpl( |
| 58 const media::VideoCaptureFormat& format, | |
| 59 const blink::WebMediaConstraints& constraints, | |
| 60 const VideoCaptureDeliverFrameCB& frame_callback) override; | 58 const VideoCaptureDeliverFrameCB& frame_callback) override; |
| 61 void StopSourceImpl() override; | 59 void StopSourceImpl() override; |
| 62 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() | 60 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() |
| 63 const override; | 61 const override; |
| 64 | 62 |
| 65 private: | 63 private: |
| 66 media::VideoCaptureFormat format_; | 64 media::VideoCaptureFormat format_; |
| 67 bool respond_to_request_refresh_frame_; | 65 bool respond_to_request_refresh_frame_; |
| 68 int max_requested_height_; | 66 int max_requested_height_; |
| 69 int max_requested_width_; | 67 int max_requested_width_; |
| 70 double max_requested_frame_rate_; | 68 double max_requested_frame_rate_; |
| 71 bool attempted_to_start_; | 69 bool attempted_to_start_; |
| 72 VideoCaptureDeliverFrameCB frame_callback_; | 70 VideoCaptureDeliverFrameCB frame_callback_; |
| 73 | 71 |
| 74 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); | 72 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); |
| 75 }; | 73 }; |
| 76 | 74 |
| 77 } // namespace content | 75 } // namespace content |
| 78 | 76 |
| 79 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ | 77 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| OLD | NEW |