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

Side by Side Diff: content/browser/renderer_host/media/media_stream_requester.h

Issue 11146008: remove VideoDeviceError and AudioDeviceError for media stream. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/common/media/media_stream_options.h" 11 #include "content/common/media/media_stream_options.h"
12 12
13 namespace media_stream { 13 namespace media_stream {
14 14
15 // MediaStreamRequester must be implemented by the class requesting a new media 15 // MediaStreamRequester must be implemented by the class requesting a new media
16 // stream to be opened. MediaStreamManager will use this interface to signal 16 // stream to be opened. MediaStreamManager will use this interface to signal
17 // success and error for a request. 17 // success and error for a request.
18 class CONTENT_EXPORT MediaStreamRequester { 18 class CONTENT_EXPORT MediaStreamRequester {
19 public: 19 public:
20 // Called as a reply of a successful call to GenerateStream or 20 // Called as a reply of a successful call to GenerateStream or
21 // GenerateStreamForDevice. 21 // GenerateStreamForDevice.
22 virtual void StreamGenerated(const std::string& label, 22 virtual void StreamGenerated(const std::string& label,
23 const StreamDeviceInfoArray& audio_devices, 23 const StreamDeviceInfoArray& audio_devices,
24 const StreamDeviceInfoArray& video_devices) = 0; 24 const StreamDeviceInfoArray& video_devices) = 0;
25 // Called if GenerateStream failed. 25 // Called if GenerateStream failed.
26 virtual void StreamGenerationFailed(const std::string& label) = 0; 26 virtual void StreamGenerationFailed(const std::string& label) = 0;
27 // AudioDeviceFailed is called if an already opened audio device encounters
28 // an error.
29 virtual void AudioDeviceFailed(const std::string& label, int index) = 0;
30 // VideoDeviceFailed is called if an already opened video device encounters
31 // an error.
32 virtual void VideoDeviceFailed(const std::string& label, int index) = 0;
33 27
34 // Called as a reply of a successful call to EnumerateDevices. 28 // Called as a reply of a successful call to EnumerateDevices.
35 virtual void DevicesEnumerated(const std::string& label, 29 virtual void DevicesEnumerated(const std::string& label,
36 const StreamDeviceInfoArray& devices) = 0; 30 const StreamDeviceInfoArray& devices) = 0;
37 // Called as a reply of a successful call to OpenDevice. 31 // Called as a reply of a successful call to OpenDevice.
38 virtual void DeviceOpened(const std::string& label, 32 virtual void DeviceOpened(const std::string& label,
39 const StreamDeviceInfo& device_info) = 0; 33 const StreamDeviceInfo& device_info) = 0;
40 34
41 protected: 35 protected:
42 virtual ~MediaStreamRequester() { 36 virtual ~MediaStreamRequester() {
43 } 37 }
44 }; 38 };
45 39
46 } // namespace media_stream 40 } // namespace media_stream
47 41
48 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_ 42 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_REQUESTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698