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; | |
zerny-chromium
2014/08/27 13:21:53
It's not clear to me why we can remove the owner-a
haraken
2014/08/27 13:24:55
It's just because WebMediaStreamSource::m_owner is
| |
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 17 matching lines...) Expand all Loading... | |
82 // extra data pointer to be deleted. | 73 // extra data pointer to be deleted. |
83 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 74 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
84 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 75 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
85 | 76 |
86 // The lifetime of the WebAudioSourceProvider should outlive the | 77 // The lifetime of the WebAudioSourceProvider should outlive the |
87 // WebMediaStreamTrack, and clients are responsible for calling | 78 // WebMediaStreamTrack, and clients are responsible for calling |
88 // setSourceProvider(0) before the WebMediaStreamTrack is going away. | 79 // setSourceProvider(0) before the WebMediaStreamTrack is going away. |
89 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); | 80 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); |
90 | 81 |
91 #if INSIDE_BLINK | 82 #if INSIDE_BLINK |
92 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(PassRefPtr<MediaStreamComponent>); | |
93 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); | 83 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); |
94 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); | 84 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); |
95 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamComponent>() const ; | |
96 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 85 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
97 #endif | 86 #endif |
98 | 87 |
99 private: | 88 private: |
100 WebPrivatePtr<MediaStreamComponent> m_private; | 89 WebPrivatePtr<MediaStreamComponent> m_private; |
101 }; | 90 }; |
102 | 91 |
103 } // namespace blink | 92 } // namespace blink |
104 | 93 |
105 #endif // WebMediaStreamTrack_h | 94 #endif // WebMediaStreamTrack_h |
OLD | NEW |