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