| 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 23 matching lines...) Expand all Loading... |
| 34 class MediaStreamComponent; | 34 class MediaStreamComponent; |
| 35 class WebAudioSourceProvider; | 35 class WebAudioSourceProvider; |
| 36 class WebMediaStream; | 36 class WebMediaStream; |
| 37 class WebMediaStreamSource; | 37 class WebMediaStreamSource; |
| 38 class WebString; | 38 class WebString; |
| 39 | 39 |
| 40 class WebMediaStreamTrack { | 40 class WebMediaStreamTrack { |
| 41 public: | 41 public: |
| 42 class ExtraData { | 42 class ExtraData { |
| 43 public: | 43 public: |
| 44 ExtraData() : m_owner(0) { } | 44 ExtraData() { } |
| 45 virtual ~ExtraData() { } | 45 virtual ~ExtraData() { } |
| 46 | |
| 47 BLINK_PLATFORM_EXPORT WebMediaStreamTrack owner(); | |
| 48 | |
| 49 #if INSIDE_BLINK | |
| 50 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamComponent*); | |
| 51 #endif | |
| 52 | |
| 53 private: | |
| 54 MediaStreamComponent* m_owner; | |
| 55 }; | 46 }; |
| 56 | 47 |
| 57 WebMediaStreamTrack() { } | 48 WebMediaStreamTrack() { } |
| 58 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } | 49 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } |
| 59 ~WebMediaStreamTrack() { reset(); } | 50 ~WebMediaStreamTrack() { reset(); } |
| 60 | 51 |
| 61 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) | 52 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) |
| 62 { | 53 { |
| 63 assign(other); | 54 assign(other); |
| 64 return *this; | 55 return *this; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 83 // extra data pointer to be deleted. | 74 // extra data pointer to be deleted. |
| 84 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 75 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
| 85 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 76 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 86 | 77 |
| 87 // The lifetime of the WebAudioSourceProvider should outlive the | 78 // The lifetime of the WebAudioSourceProvider should outlive the |
| 88 // WebMediaStreamTrack, and clients are responsible for calling | 79 // WebMediaStreamTrack, and clients are responsible for calling |
| 89 // setSourceProvider(0) before the WebMediaStreamTrack is going away. | 80 // setSourceProvider(0) before the WebMediaStreamTrack is going away. |
| 90 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); | 81 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); |
| 91 | 82 |
| 92 #if INSIDE_BLINK | 83 #if INSIDE_BLINK |
| 93 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(PassRefPtr<MediaStreamComponent>); | |
| 94 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); | 84 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); |
| 95 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); | 85 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); |
| 96 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamComponent>() const
; | 86 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamComponent>() const
; |
| 97 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 87 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
| 98 #endif | 88 #endif |
| 99 | 89 |
| 100 private: | 90 private: |
| 101 WebPrivatePtr<MediaStreamComponent> m_private; | 91 WebPrivatePtr<MediaStreamComponent> m_private; |
| 102 }; | 92 }; |
| 103 | 93 |
| 104 } // namespace blink | 94 } // namespace blink |
| 105 | 95 |
| 106 #endif // WebMediaStreamTrack_h | 96 #endif // WebMediaStreamTrack_h |
| OLD | NEW |