Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: content/renderer/media/video_capture_impl_manager_unittest.cc

Issue 2400443006: VideoCapture: moar VideoCapture renderer-->host messages to mojo, part 3 (Closed)
Patch Set: minor rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void Pause(int device_id) { pause_callback_->OnPaused(session_id()); } 74 void Pause(int device_id) { pause_callback_->OnPaused(session_id()); }
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(GetDeviceSupportedFormats,
84 void(int32_t,
85 int32_t,
86 const GetDeviceSupportedFormatsCallback&));
87 MOCK_METHOD3(GetDeviceFormatsInUse,
88 void(int32_t, int32_t, const GetDeviceFormatsInUseCallback&));
83 89
84 PauseResumeCallback* const pause_callback_; 90 PauseResumeCallback* const pause_callback_;
85 const base::Closure destruct_callback_; 91 const base::Closure destruct_callback_;
86 92
87 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImpl); 93 DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureImpl);
88 }; 94 };
89 95
90 class MockVideoCaptureImplManager : public VideoCaptureImplManager { 96 class MockVideoCaptureImplManager : public VideoCaptureImplManager {
91 public: 97 public:
92 MockVideoCaptureImplManager(PauseResumeCallback* pause_callback, 98 MockVideoCaptureImplManager(PauseResumeCallback* pause_callback,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 run_loop.Run(); 301 run_loop.Run();
296 } 302 }
297 303
298 StopCaptureForAllClients(&stop_callbacks); 304 StopCaptureForAllClients(&stop_callbacks);
299 for (const auto& release_callback : release_callbacks) 305 for (const auto& release_callback : release_callbacks)
300 release_callback.Run(); 306 release_callback.Run();
301 cleanup_run_loop_.Run(); 307 cleanup_run_loop_.Run();
302 } 308 }
303 309
304 } // namespace content 310 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698