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 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef MediaStreamTrackSourcesRequest_h | 26 #ifndef MediaStreamTrackSourcesRequest_h |
27 #define MediaStreamTrackSourcesRequest_h | 27 #define MediaStreamTrackSourcesRequest_h |
28 | 28 |
29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
30 #include "public/platform/WebVector.h" | 30 #include "public/platform/WebVector.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include "wtf/PassOwnPtr.h" | |
33 | 32 |
34 namespace blink { | 33 namespace blink { |
35 | 34 |
36 class WebSourceInfo; | 35 class WebSourceInfo; |
37 | 36 |
38 class MediaStreamTrackSourcesRequest : public GarbageCollectedFinalized<MediaStr
eamTrackSourcesRequest> { | 37 class MediaStreamTrackSourcesRequest : public GarbageCollectedFinalized<MediaStr
eamTrackSourcesRequest> { |
39 public: | 38 public: |
40 class ExtraData { | |
41 public: | |
42 virtual ~ExtraData() { } | |
43 }; | |
44 | |
45 virtual ~MediaStreamTrackSourcesRequest() { } | 39 virtual ~MediaStreamTrackSourcesRequest() { } |
46 | 40 |
47 virtual String origin() = 0; | 41 virtual String origin() = 0; |
48 virtual void requestSucceeded(const WebVector<WebSourceInfo>&) = 0; | 42 virtual void requestSucceeded(const WebVector<WebSourceInfo>&) = 0; |
49 | 43 |
50 ExtraData* extraData() const { return m_extraData.get(); } | |
51 void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = extraData
; } | |
52 | |
53 // Need to eagerly finalize the ExtraData. | |
54 EAGERLY_FINALIZE(); | |
55 DEFINE_INLINE_VIRTUAL_TRACE() { } | 44 DEFINE_INLINE_VIRTUAL_TRACE() { } |
56 | 45 |
57 protected: | 46 protected: |
58 MediaStreamTrackSourcesRequest() { } | 47 MediaStreamTrackSourcesRequest() { } |
59 | |
60 private: | |
61 OwnPtr<ExtraData> m_extraData; | |
62 }; | 48 }; |
63 | 49 |
64 } // namespace blink | 50 } // namespace blink |
65 | 51 |
66 #endif // MediaStreamTrackSourcesRequest_h | 52 #endif // MediaStreamTrackSourcesRequest_h |
OLD | NEW |