| 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 <array> | 5 #include <array> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void Resume(int32_t device_id, | 76 void Resume(int32_t device_id, |
| 77 int32_t session_id, | 77 int32_t session_id, |
| 78 const media::VideoCaptureParams& params) override { | 78 const media::VideoCaptureParams& params) override { |
| 79 pause_callback_->OnResumed(session_id); | 79 pause_callback_->OnResumed(session_id); |
| 80 } | 80 } |
| 81 | 81 |
| 82 MOCK_METHOD1(RequestRefreshFrame, void(int32_t)); | 82 MOCK_METHOD1(RequestRefreshFrame, void(int32_t)); |
| 83 MOCK_METHOD3(ReleaseBuffer, | 83 MOCK_METHOD3(ReleaseBuffer, |
| 84 void(int32_t, int32_t, double)); | 84 void(int32_t, int32_t, double)); |
| 85 MOCK_METHOD3(GetDeviceSupportedFormats, | 85 |
| 86 void(int32_t, | 86 void GetDeviceSupportedFormats(int32_t, |
| 87 int32_t, | 87 int32_t, |
| 88 const GetDeviceSupportedFormatsCallback&)); | 88 GetDeviceSupportedFormatsCallback) override { |
| 89 MOCK_METHOD3(GetDeviceFormatsInUse, | 89 NOTREACHED(); |
| 90 void(int32_t, int32_t, const GetDeviceFormatsInUseCallback&)); | 90 } |
| 91 |
| 92 void GetDeviceFormatsInUse(int32_t, |
| 93 int32_t, |
| 94 GetDeviceFormatsInUseCallback) override { |
| 95 NOTREACHED(); |
| 96 } |
| 91 | 97 |
| 92 PauseResumeCallback* const pause_callback_; | 98 PauseResumeCallback* const pause_callback_; |
| 93 const base::Closure destruct_callback_; | 99 const base::Closure destruct_callback_; |
| 94 | 100 |
| 95 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImpl); | 101 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImpl); |
| 96 }; | 102 }; |
| 97 | 103 |
| 98 class MockVideoCaptureImplManager : public VideoCaptureImplManager { | 104 class MockVideoCaptureImplManager : public VideoCaptureImplManager { |
| 99 public: | 105 public: |
| 100 MockVideoCaptureImplManager(PauseResumeCallback* pause_callback, | 106 MockVideoCaptureImplManager(PauseResumeCallback* pause_callback, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 run_loop.Run(); | 313 run_loop.Run(); |
| 308 } | 314 } |
| 309 | 315 |
| 310 StopCaptureForAllClients(&stop_callbacks); | 316 StopCaptureForAllClients(&stop_callbacks); |
| 311 for (const auto& release_callback : release_callbacks) | 317 for (const auto& release_callback : release_callbacks) |
| 312 release_callback.Run(); | 318 release_callback.Run(); |
| 313 cleanup_run_loop_.Run(); | 319 cleanup_run_loop_.Run(); |
| 314 } | 320 } |
| 315 | 321 |
| 316 } // namespace content | 322 } // namespace content |
| OLD | NEW |