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

Side by Side Diff: content/browser/renderer_host/media/video_capture_manager_unittest.cc

Issue 2686763002: [Mojo Video Capture] Split OnIncomingCapturedVideoFrame() to OnNewBuffer() and OnFrameReadyInBuffer( (Closed)
Patch Set: rebase Created 3 years, 9 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 (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 // Unit test for VideoCaptureManager. 5 // Unit test for VideoCaptureManager.
6 6
7 #include "content/browser/renderer_host/media/video_capture_manager.h" 7 #include "content/browser/renderer_host/media/video_capture_manager.h"
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 // Needed as an input argument to StartCaptureForClient(). 149 // Needed as an input argument to StartCaptureForClient().
150 class MockFrameObserver : public VideoCaptureControllerEventHandler { 150 class MockFrameObserver : public VideoCaptureControllerEventHandler {
151 public: 151 public:
152 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id)); 152 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id));
153 153
154 void OnBufferCreated(VideoCaptureControllerID id, 154 void OnBufferCreated(VideoCaptureControllerID id,
155 mojo::ScopedSharedBufferHandle handle, 155 mojo::ScopedSharedBufferHandle handle,
156 int length, int buffer_id) override {} 156 int length, int buffer_id) override {}
157 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {} 157 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {}
158 void OnBufferReady(VideoCaptureControllerID id, 158 void OnBufferReady(
159 int buffer_id, 159 VideoCaptureControllerID id,
160 const scoped_refptr<media::VideoFrame>& frame) override {} 160 int buffer_id,
161 const media::mojom::VideoFrameInfoPtr& frame_info) override {}
161 void OnEnded(VideoCaptureControllerID id) override {} 162 void OnEnded(VideoCaptureControllerID id) override {}
162 163
163 void OnGotControllerCallback(VideoCaptureControllerID) {} 164 void OnGotControllerCallback(VideoCaptureControllerID) {}
164 }; 165 };
165 166
166 // Input argument for testing AddVideoCaptureObserver(). 167 // Input argument for testing AddVideoCaptureObserver().
167 class MockVideoCaptureObserver : public media::VideoCaptureObserver { 168 class MockVideoCaptureObserver : public media::VideoCaptureObserver {
168 public: 169 public:
169 MOCK_METHOD1(OnVideoCaptureStarted, void(media::VideoFacingMode)); 170 MOCK_METHOD1(OnVideoCaptureStarted, void(media::VideoFacingMode));
170 MOCK_METHOD1(OnVideoCaptureStopped, void(media::VideoFacingMode)); 171 MOCK_METHOD1(OnVideoCaptureStopped, void(media::VideoFacingMode));
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 // Wait to check callbacks before removing the listener. 775 // Wait to check callbacks before removing the listener.
775 base::RunLoop().RunUntilIdle(); 776 base::RunLoop().RunUntilIdle();
776 vcm_->UnregisterListener(); 777 vcm_->UnregisterListener();
777 } 778 }
778 #endif 779 #endif
779 780
780 // TODO(mcasas): Add a test to check consolidation of the supported formats 781 // TODO(mcasas): Add a test to check consolidation of the supported formats
781 // provided by the device when http://crbug.com/323913 is closed. 782 // provided by the device when http://crbug.com/323913 is closed.
782 783
783 } // namespace content 784 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698