| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "content/child/child_process.h" | 6 #include "content/child/child_process.h" |
| 7 #include "content/common/media/video_capture_messages.h" | 7 #include "content/common/media/video_capture_messages.h" |
| 8 #include "content/renderer/media/video_capture_impl.h" | 8 #include "content/renderer/media/video_capture_impl.h" |
| 9 #include "media/base/bind_to_current_loop.h" | 9 #include "media/base/bind_to_current_loop.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 session_id_, message_filter_.get())); | 126 session_id_, message_filter_.get())); |
| 127 | 127 |
| 128 video_capture_impl_->device_id_ = 2; | 128 video_capture_impl_->device_id_ = 2; |
| 129 } | 129 } |
| 130 | 130 |
| 131 virtual ~VideoCaptureImplTest() { | 131 virtual ~VideoCaptureImplTest() { |
| 132 } | 132 } |
| 133 | 133 |
| 134 protected: | 134 protected: |
| 135 MOCK_METHOD2(OnFrameReady, | 135 MOCK_METHOD2(OnFrameReady, |
| 136 void(const scoped_refptr<media::VideoFrame>&, | 136 void(const scoped_refptr<media::VideoFrame>&, base::TimeTicks)); |
| 137 const base::TimeTicks&)); | |
| 138 MOCK_METHOD1(OnStateUpdate, void(VideoCaptureState)); | 137 MOCK_METHOD1(OnStateUpdate, void(VideoCaptureState)); |
| 139 MOCK_METHOD1(OnDeviceFormatsInUse, | 138 MOCK_METHOD1(OnDeviceFormatsInUse, |
| 140 void(const media::VideoCaptureFormats&)); | 139 void(const media::VideoCaptureFormats&)); |
| 141 MOCK_METHOD1(OnDeviceSupportedFormats, | 140 MOCK_METHOD1(OnDeviceSupportedFormats, |
| 142 void(const media::VideoCaptureFormats&)); | 141 void(const media::VideoCaptureFormats&)); |
| 143 | 142 |
| 144 void Init() { | 143 void Init() { |
| 145 video_capture_impl_->Init(); | 144 video_capture_impl_->Init(); |
| 146 } | 145 } |
| 147 | 146 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 StartCapture(params_small_); | 250 StartCapture(params_small_); |
| 252 | 251 |
| 253 // Receive state change message from browser. | 252 // Receive state change message from browser. |
| 254 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); | 253 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); |
| 255 | 254 |
| 256 StopCapture(); | 255 StopCapture(); |
| 257 DeInit(); | 256 DeInit(); |
| 258 } | 257 } |
| 259 | 258 |
| 260 } // namespace content | 259 } // namespace content |
| OLD | NEW |