| 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 #include "content/renderer/media/mock_media_stream_video_source.h" | 5 #include "content/renderer/media/mock_media_stream_video_source.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop/message_loop.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 MockMediaStreamVideoSource::MockMediaStreamVideoSource( | 14 MockMediaStreamVideoSource::MockMediaStreamVideoSource( |
| 14 bool manual_get_supported_formats) | 15 bool manual_get_supported_formats) |
| 15 : MediaStreamVideoSource(base::MessageLoopProxy::current()), | 16 : MediaStreamVideoSource(base::MessageLoopProxy::current()), |
| 16 manual_get_supported_formats_(manual_get_supported_formats), | 17 manual_get_supported_formats_(manual_get_supported_formats), |
| 17 max_requested_height_(0), | 18 max_requested_height_(0), |
| 18 max_requested_width_(0), | 19 max_requested_width_(0), |
| 19 attempted_to_start_(false) { | 20 attempted_to_start_(false) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 100 |
| 100 void MockMediaStreamVideoSource::DeliverVideoFrameOnIO( | 101 void MockMediaStreamVideoSource::DeliverVideoFrameOnIO( |
| 101 const scoped_refptr<media::VideoFrame>& frame, | 102 const scoped_refptr<media::VideoFrame>& frame, |
| 102 media::VideoCaptureFormat format, | 103 media::VideoCaptureFormat format, |
| 103 const VideoCaptureDeliverFrameCB& frame_callback) { | 104 const VideoCaptureDeliverFrameCB& frame_callback) { |
| 104 DCHECK(io_message_loop()->BelongsToCurrentThread()); | 105 DCHECK(io_message_loop()->BelongsToCurrentThread()); |
| 105 frame_callback.Run(frame, format); | 106 frame_callback.Run(frame, format); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace content | 109 } // namespace content |
| OLD | NEW |