| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. All rights reserved. | 2 * Copyright 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef MediaStreamCenter_h | 31 #ifndef MediaStreamCenter_h |
| 32 #define MediaStreamCenter_h | 32 #define MediaStreamCenter_h |
| 33 | 33 |
| 34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
| 35 #include "platform/heap/Handle.h" |
| 35 #include "public/platform/WebMediaStreamCenterClient.h" | 36 #include "public/platform/WebMediaStreamCenterClient.h" |
| 36 #include "public/platform/WebVector.h" | 37 #include "public/platform/WebVector.h" |
| 37 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/PassRefPtr.h" | 39 #include "wtf/PassRefPtr.h" |
| 39 #include "wtf/text/WTFString.h" | 40 #include "wtf/text/WTFString.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 class WebMediaStream; | 43 class WebMediaStream; |
| 43 class WebMediaStreamCenter; | 44 class WebMediaStreamCenter; |
| 44 class WebMediaStreamTrack; | 45 class WebMediaStreamTrack; |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace WebCore { | 48 namespace WebCore { |
| 48 | 49 |
| 49 class AudioSourceProvider; | 50 class AudioSourceProvider; |
| 50 class MediaStreamComponent; | 51 class MediaStreamComponent; |
| 51 class MediaStreamDescriptor; | 52 class MediaStreamDescriptor; |
| 52 class MediaStreamTrackSourcesRequest; | 53 class MediaStreamTrackSourcesRequest; |
| 53 | 54 |
| 54 class PLATFORM_EXPORT MediaStreamCenter FINAL : public blink::WebMediaStreamCent
erClient { | 55 class PLATFORM_EXPORT MediaStreamCenter FINAL : public blink::WebMediaStreamCent
erClient { |
| 55 WTF_MAKE_NONCOPYABLE(MediaStreamCenter); | 56 WTF_MAKE_NONCOPYABLE(MediaStreamCenter); |
| 56 public: | 57 public: |
| 57 virtual ~MediaStreamCenter(); | 58 virtual ~MediaStreamCenter(); |
| 58 | 59 |
| 59 static MediaStreamCenter& instance(); | 60 static MediaStreamCenter& instance(); |
| 60 | 61 |
| 61 bool getMediaStreamTrackSources(PassRefPtr<MediaStreamTrackSourcesRequest>); | 62 bool getMediaStreamTrackSources(PassRefPtrWillBeRawPtr<MediaStreamTrackSourc
esRequest>); |
| 62 | 63 |
| 63 void didCreateMediaStreamTrack(MediaStreamComponent*); | 64 void didCreateMediaStreamTrack(MediaStreamComponent*); |
| 64 void didSetMediaStreamTrackEnabled(MediaStreamComponent*); | 65 void didSetMediaStreamTrackEnabled(MediaStreamComponent*); |
| 65 bool didStopMediaStreamTrack(MediaStreamComponent*); | 66 bool didStopMediaStreamTrack(MediaStreamComponent*); |
| 66 PassOwnPtr<AudioSourceProvider> createWebAudioSourceFromMediaStreamTrack(Med
iaStreamComponent*); | 67 PassOwnPtr<AudioSourceProvider> createWebAudioSourceFromMediaStreamTrack(Med
iaStreamComponent*); |
| 67 | 68 |
| 68 void didCreateMediaStream(MediaStreamDescriptor*); | 69 void didCreateMediaStream(MediaStreamDescriptor*); |
| 69 void didCreateMediaStreamAndTracks(MediaStreamDescriptor*); | 70 void didCreateMediaStreamAndTracks(MediaStreamDescriptor*); |
| 70 bool didAddMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*); | 71 bool didAddMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*); |
| 71 bool didRemoveMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*
); | 72 bool didRemoveMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*
); |
| 72 void didStopLocalMediaStream(MediaStreamDescriptor*); | 73 void didStopLocalMediaStream(MediaStreamDescriptor*); |
| 73 | 74 |
| 74 // blink::WebMediaStreamCenterClient | 75 // blink::WebMediaStreamCenterClient |
| 75 virtual void stopLocalMediaStream(const blink::WebMediaStream&) OVERRIDE; | 76 virtual void stopLocalMediaStream(const blink::WebMediaStream&) OVERRIDE; |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 MediaStreamCenter(); | 79 MediaStreamCenter(); |
| 79 | 80 |
| 80 OwnPtr<blink::WebMediaStreamCenter> m_private; | 81 OwnPtr<blink::WebMediaStreamCenter> m_private; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace WebCore | 84 } // namespace WebCore |
| 84 | 85 |
| 85 #endif // MediaStreamCenter_h | 86 #endif // MediaStreamCenter_h |
| OLD | NEW |