| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef MediaStreamCenter_h | 32 #ifndef MediaStreamCenter_h |
| 33 #define MediaStreamCenter_h | 33 #define MediaStreamCenter_h |
| 34 | 34 |
| 35 #include "heap/Handle.h" |
| 35 #include "platform/PlatformExport.h" | 36 #include "platform/PlatformExport.h" |
| 36 #include "public/platform/WebMediaStreamCenterClient.h" | 37 #include "public/platform/WebMediaStreamCenterClient.h" |
| 37 #include "public/platform/WebVector.h" | 38 #include "public/platform/WebVector.h" |
| 38 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/PassRefPtr.h" | 40 #include "wtf/PassRefPtr.h" |
| 40 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 class WebMediaStream; | 44 class WebMediaStream; |
| 44 class WebMediaStreamCenter; | 45 class WebMediaStreamCenter; |
| 45 class WebMediaStreamTrack; | 46 class WebMediaStreamTrack; |
| 46 } | 47 } |
| 47 | 48 |
| 48 namespace WebCore { | 49 namespace WebCore { |
| 49 | 50 |
| 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(MediaStreamDescriptor*, MediaStreamCompon
ent*); | 65 void didSetMediaStreamTrackEnabled(MediaStreamDescriptor*, MediaStreamCompon
ent*); |
| 65 bool didStopMediaStreamTrack(MediaStreamComponent*); | 66 bool didStopMediaStreamTrack(MediaStreamComponent*); |
| 66 | 67 |
| 67 void didCreateMediaStream(MediaStreamDescriptor*); | 68 void didCreateMediaStream(MediaStreamDescriptor*); |
| 68 bool didAddMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*); | 69 bool didAddMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*); |
| 69 bool didRemoveMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*
); | 70 bool didRemoveMediaStreamTrack(MediaStreamDescriptor*, MediaStreamComponent*
); |
| 70 void didStopLocalMediaStream(MediaStreamDescriptor*); | 71 void didStopLocalMediaStream(MediaStreamDescriptor*); |
| 71 | 72 |
| 72 // blink::WebMediaStreamCenterClient | 73 // blink::WebMediaStreamCenterClient |
| 73 virtual void stopLocalMediaStream(const blink::WebMediaStream&) OVERRIDE; | 74 virtual void stopLocalMediaStream(const blink::WebMediaStream&) OVERRIDE; |
| 74 | 75 |
| 75 private: | 76 private: |
| 76 MediaStreamCenter(); | 77 MediaStreamCenter(); |
| 77 | 78 |
| 78 OwnPtr<blink::WebMediaStreamCenter> m_private; | 79 OwnPtr<blink::WebMediaStreamCenter> m_private; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace WebCore | 82 } // namespace WebCore |
| 82 | 83 |
| 83 #endif // MediaStreamCenter_h | 84 #endif // MediaStreamCenter_h |
| OLD | NEW |