| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef WebMediaStreamTrack_h | 25 #ifndef WebMediaStreamTrack_h |
| 26 #define WebMediaStreamTrack_h | 26 #define WebMediaStreamTrack_h |
| 27 | 27 |
| 28 #include "WebCommon.h" | 28 #include "WebCommon.h" |
| 29 #include "WebNonCopyable.h" | 29 #include "WebNonCopyable.h" |
| 30 #include "WebPrivatePtr.h" | 30 #include "WebPrivatePtr.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace blink { |
| 33 class MediaStreamComponent; | 33 class MediaStreamComponent; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 class WebAudioSourceProvider; | 37 class WebAudioSourceProvider; |
| 38 class WebMediaStream; | 38 class WebMediaStream; |
| 39 class WebMediaStreamSource; | 39 class WebMediaStreamSource; |
| 40 class WebString; | 40 class WebString; |
| 41 | 41 |
| 42 class WebMediaStreamTrack { | 42 class WebMediaStreamTrack { |
| 43 public: | 43 public: |
| 44 class ExtraData { | 44 class ExtraData { |
| 45 public: | 45 public: |
| 46 ExtraData() : m_owner(0) { } | 46 ExtraData() : m_owner(0) { } |
| 47 virtual ~ExtraData() { } | 47 virtual ~ExtraData() { } |
| 48 | 48 |
| 49 BLINK_PLATFORM_EXPORT WebMediaStreamTrack owner(); | 49 BLINK_PLATFORM_EXPORT WebMediaStreamTrack owner(); |
| 50 | 50 |
| 51 #if INSIDE_BLINK | 51 #if INSIDE_BLINK |
| 52 BLINK_PLATFORM_EXPORT void setOwner(WebCore::MediaStreamComponent*); | 52 BLINK_PLATFORM_EXPORT void setOwner(blink::MediaStreamComponent*); |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 WebCore::MediaStreamComponent* m_owner; | 56 blink::MediaStreamComponent* m_owner; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 WebMediaStreamTrack() { } | 59 WebMediaStreamTrack() { } |
| 60 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } | 60 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } |
| 61 ~WebMediaStreamTrack() { reset(); } | 61 ~WebMediaStreamTrack() { reset(); } |
| 62 | 62 |
| 63 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) | 63 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) |
| 64 { | 64 { |
| 65 assign(other); | 65 assign(other); |
| 66 return *this; | 66 return *this; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 84 // extra data pointer to be deleted. | 84 // extra data pointer to be deleted. |
| 85 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 85 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
| 86 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 86 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 87 | 87 |
| 88 // The lifetime of the WebAudioSourceProvider should outlive the | 88 // The lifetime of the WebAudioSourceProvider should outlive the |
| 89 // WebMediaStreamTrack, and clients are responsible for calling | 89 // WebMediaStreamTrack, and clients are responsible for calling |
| 90 // setSourceProvider(0) before the WebMediaStreamTrack is going away. | 90 // setSourceProvider(0) before the WebMediaStreamTrack is going away. |
| 91 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); | 91 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); |
| 92 | 92 |
| 93 #if INSIDE_BLINK | 93 #if INSIDE_BLINK |
| 94 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(PassRefPtr<WebCore::MediaStreamCom
ponent>); | 94 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(PassRefPtr<blink::MediaStreamCompo
nent>); |
| 95 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(WebCore::MediaStreamComponent*); | 95 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(blink::MediaStreamComponent*); |
| 96 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(WebCore::MediaStreamCom
ponent*); | 96 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(blink::MediaStreamCompo
nent*); |
| 97 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<WebCore::MediaStreamComponent
>() const; | 97 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<blink::MediaStreamComponent>(
) const; |
| 98 BLINK_PLATFORM_EXPORT operator WebCore::MediaStreamComponent*() const; | 98 BLINK_PLATFORM_EXPORT operator blink::MediaStreamComponent*() const; |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 WebPrivatePtr<WebCore::MediaStreamComponent> m_private; | 102 WebPrivatePtr<blink::MediaStreamComponent> m_private; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // WebMediaStreamTrack_h | 107 #endif // WebMediaStreamTrack_h |
| OLD | NEW |