Chromium Code Reviews| 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 // Unit test for VideoCaptureManager. | 5 // Unit test for VideoCaptureManager. |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 }; // class MockMediaStreamProviderListener | 41 }; // class MockMediaStreamProviderListener |
| 42 | 42 |
| 43 // Needed as an input argument to StartCaptureForClient(). | 43 // Needed as an input argument to StartCaptureForClient(). |
| 44 class MockFrameObserver : public VideoCaptureControllerEventHandler { | 44 class MockFrameObserver : public VideoCaptureControllerEventHandler { |
| 45 public: | 45 public: |
| 46 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id)); | 46 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id)); |
| 47 | 47 |
| 48 void OnBufferCreated(VideoCaptureControllerID id, | 48 void OnBufferCreated(VideoCaptureControllerID id, |
| 49 base::SharedMemoryHandle handle, | 49 base::SharedMemoryHandle handle, |
| 50 int length, int buffer_id) override {} | 50 int length, int buffer_id) override {} |
| 51 void OnBufferCreated2( | |
| 52 VideoCaptureControllerID id, | |
| 53 const std::vector<gfx::GpuMemoryBufferHandle>& gmb_handles, | |
|
reveman
2015/08/26 11:54:04
nit: s/gmb_handles/handles/
emircan
2015/08/26 21:23:12
Done.
| |
| 54 const gfx::Size& size, | |
| 55 int buffer_id) override {} | |
| 51 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {} | 56 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {} |
| 52 void OnBufferReady(VideoCaptureControllerID id, | 57 void OnBufferReady(VideoCaptureControllerID id, |
| 53 int buffer_id, | 58 int buffer_id, |
| 54 const scoped_refptr<media::VideoFrame>& frame, | 59 const scoped_refptr<media::VideoFrame>& frame, |
| 55 const base::TimeTicks& timestamp) override {} | 60 const base::TimeTicks& timestamp) override {} |
| 56 void OnEnded(VideoCaptureControllerID id) override {} | 61 void OnEnded(VideoCaptureControllerID id) override {} |
| 57 | 62 |
| 58 void OnGotControllerCallback(VideoCaptureControllerID) {} | 63 void OnGotControllerCallback(VideoCaptureControllerID) {} |
| 59 }; | 64 }; |
| 60 | 65 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 | 507 |
| 503 // Wait to check callbacks before removing the listener | 508 // Wait to check callbacks before removing the listener |
| 504 message_loop_->RunUntilIdle(); | 509 message_loop_->RunUntilIdle(); |
| 505 vcm_->Unregister(); | 510 vcm_->Unregister(); |
| 506 } | 511 } |
| 507 | 512 |
| 508 // TODO(mcasas): Add a test to check consolidation of the supported formats | 513 // TODO(mcasas): Add a test to check consolidation of the supported formats |
| 509 // provided by the device when http://crbug.com/323913 is closed. | 514 // provided by the device when http://crbug.com/323913 is closed. |
| 510 | 515 |
| 511 } // namespace content | 516 } // namespace content |
| OLD | NEW |