| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 void Pause(int device_id) { pause_callback_->OnPaused(session_id()); } | 70 void Pause(int device_id) { pause_callback_->OnPaused(session_id()); } |
| 71 | 71 |
| 72 void Resume(int32_t device_id, | 72 void Resume(int32_t device_id, |
| 73 int32_t session_id, | 73 int32_t session_id, |
| 74 const media::VideoCaptureParams& params) override { | 74 const media::VideoCaptureParams& params) override { |
| 75 pause_callback_->OnResumed(session_id); | 75 pause_callback_->OnResumed(session_id); |
| 76 } | 76 } |
| 77 | 77 |
| 78 MOCK_METHOD1(RequestRefreshFrame, void(int32_t)); | 78 MOCK_METHOD1(RequestRefreshFrame, void(int32_t)); |
| 79 MOCK_METHOD4(ReleaseBuffer, | 79 MOCK_METHOD3(ReleaseBuffer, |
| 80 void(int32_t, int32_t, const gpu::SyncToken&, double)); | 80 void(int32_t, int32_t, double)); |
| 81 MOCK_METHOD3(GetDeviceSupportedFormats, | 81 MOCK_METHOD3(GetDeviceSupportedFormats, |
| 82 void(int32_t, | 82 void(int32_t, |
| 83 int32_t, | 83 int32_t, |
| 84 const GetDeviceSupportedFormatsCallback&)); | 84 const GetDeviceSupportedFormatsCallback&)); |
| 85 MOCK_METHOD3(GetDeviceFormatsInUse, | 85 MOCK_METHOD3(GetDeviceFormatsInUse, |
| 86 void(int32_t, int32_t, const GetDeviceFormatsInUseCallback&)); | 86 void(int32_t, int32_t, const GetDeviceFormatsInUseCallback&)); |
| 87 | 87 |
| 88 PauseResumeCallback* const pause_callback_; | 88 PauseResumeCallback* const pause_callback_; |
| 89 const base::Closure destruct_callback_; | 89 const base::Closure destruct_callback_; |
| 90 | 90 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 run_loop.Run(); | 292 run_loop.Run(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 StopCaptureForAllClients(&stop_callbacks); | 295 StopCaptureForAllClients(&stop_callbacks); |
| 296 for (const auto& release_callback : release_callbacks) | 296 for (const auto& release_callback : release_callbacks) |
| 297 release_callback.Run(); | 297 release_callback.Run(); |
| 298 cleanup_run_loop_.Run(); | 298 cleanup_run_loop_.Run(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace content | 301 } // namespace content |
| OLD | NEW |