OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_EVENTHANDLER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_EVENTHANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/common/media/media_stream_options.h" |
| 11 |
| 12 class MediaStreamDispatcherEventHandler { |
| 13 public: |
| 14 // A new media stream have been created. |
| 15 virtual void OnStreamGenerated( |
| 16 int request_id, |
| 17 const std::string& label, |
| 18 const media_stream::StreamDeviceInfoArray& audio_device_array, |
| 19 const media_stream::StreamDeviceInfoArray& video_device_array) = 0; |
| 20 |
| 21 // Creation of a new media stream failed. The user might have denied access |
| 22 // to the requested devices or no device is available. |
| 23 virtual void OnStreamGenerationFailed(int request_id) = 0; |
| 24 |
| 25 // An error have occurred on a video device. This is called if a runtime |
| 26 // error occurs. |
| 27 virtual void OnVideoDeviceFailed(const std::string& label, |
| 28 int index) = 0; |
| 29 |
| 30 // An error have occurred on an audio device. This is called if a runtime |
| 31 // error occurs. |
| 32 virtual void OnAudioDeviceFailed(const std::string& label, |
| 33 int index) = 0; |
| 34 |
| 35 protected: |
| 36 virtual ~MediaStreamDispatcherEventHandler(); |
| 37 }; |
| 38 |
| 39 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_EVENTHANDLER_H_ |
OLD | NEW |