OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module video_capture.mojom; | 5 module video_capture.mojom; |
6 | 6 |
7 // Instances are passed into MockVideoCaptureDevice::AllocateAndStart(). | 7 // Instances are passed into MockVideoCaptureDevice::AllocateAndStart(). |
8 // Even though this interface is empty, it is useful in testing in order to | 8 // Even though this interface is empty, it is useful in testing in order to |
9 // have the MockVideoCaptureDevice take ownership of the MockDeviceClient | 9 // have the MockVideoCaptureDevice take ownership of the MockDeviceClient |
10 // passed to it. | 10 // passed to it. |
11 interface MockDeviceClient { | 11 interface MockDeviceClient { |
12 | 12 |
13 }; | 13 }; |
14 | 14 |
15 // Essentially a Mojo equivalent of media::VideoCaptureDevice used for testing | 15 // Essentially a Mojo equivalent of media::VideoCaptureDevice used for testing |
16 // that expected calls to this interface are made by the service implementation. | 16 // that expected calls to this interface are made by the service implementation. |
17 // The Mojo equivalent is needed to allow such tests across the Mojo boundary. | 17 // The Mojo equivalent is needed to allow such tests across the Mojo boundary. |
18 // This interface contains only simplified versions of the methods from | 18 // This interface contains only simplified versions of the methods from |
19 // media::VideoCaptureDevice that we actually verify in tests. | 19 // media::VideoCaptureDevice that we actually verify in tests. |
20 // | 20 // |
21 // Similar to VideoCaptureDeviceProxy, this interface is an abstraction of a | 21 // Similar to video_capture.mojom.Device, this interface is an abstraction of a |
22 // device, but the purpose of the two interfaces is quite different. | 22 // device, but the purpose of the two interfaces is quite different. |
23 // VideoCaptureDeviceProxy is for production clients of the Mojo service to | 23 // video_capture.mojom.Device is for production clients of the Mojo service to |
24 // interact with the devices. MockVideoCaptureDevice is for tests of the Mojo | 24 // interact with the devices. MockMediaDevice is for tests of the Mojo |
25 // service to allow verification of calls of the service made to instances of | 25 // service to allow verification of calls of the service made to instances of |
26 // media::VideoCaptureDevice. | 26 // media::VideoCaptureDevice. |
27 // | 27 // |
28 // Instances can be added to the mock factory provided by the | 28 // Instances can be added to the mock factory provided by the |
29 // VideoCaptureService. | 29 // video_capture.mojom.Service. |
30 interface MockVideoCaptureDevice { | 30 interface MockMediaDevice { |
31 AllocateAndStart(MockDeviceClient client); | 31 AllocateAndStart(MockDeviceClient client); |
32 StopAndDeAllocate(); | 32 StopAndDeAllocate(); |
33 }; | 33 }; |
OLD | NEW |