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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_
10 #include "content/common/content_export.h"
11 #include "content/common/media/media_stream_options.h"
15 // MediaStreamRequester must be implemented by the class requesting a new media
16 // stream to be opened. MediaStreamManager will use this interface to signal
17 // success and error for a request.
18 class CONTENT_EXPORT MediaStreamRequester
{
20 // Called as a reply of a successful call to GenerateStream.
21 virtual void StreamGenerated(const std::string
& label
,
22 const StreamDeviceInfoArray
& audio_devices
,
23 const StreamDeviceInfoArray
& video_devices
) = 0;
24 // Called if GenerateStream failed or if stream has been stopped by the user.
25 // TODO(sergeyu): Rename this method and corresponding IPC message or maybe
26 // add a separate IPC message.
27 virtual void StreamGenerationFailed(const std::string
& label
) = 0;
29 // Called as a reply of a successful call to EnumerateDevices.
30 virtual void DevicesEnumerated(const std::string
& label
,
31 const StreamDeviceInfoArray
& devices
) = 0;
32 // Called as a reply of a successful call to OpenDevice.
33 virtual void DeviceOpened(const std::string
& label
,
34 const StreamDeviceInfo
& device_info
) = 0;
37 virtual ~MediaStreamRequester() {
41 } // namespace content
43 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_