OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "modules/EventTargetModules.h" | 31 #include "modules/EventTargetModules.h" |
32 #include "modules/ModulesExport.h" | 32 #include "modules/ModulesExport.h" |
33 #include "modules/mediastream/MediaStreamTrack.h" | 33 #include "modules/mediastream/MediaStreamTrack.h" |
34 #include "platform/Timer.h" | 34 #include "platform/Timer.h" |
35 #include "platform/mediastream/MediaStreamDescriptor.h" | 35 #include "platform/mediastream/MediaStreamDescriptor.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class ExceptionState; | 39 class ExceptionState; |
40 | 40 |
41 class MODULES_EXPORT MediaStream final | 41 class MODULES_EXPORT MediaStream |
42 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaStream> | 42 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaStream> |
43 , public URLRegistrable | 43 , public URLRegistrable |
44 , public MediaStreamDescriptorClient | 44 , public MediaStreamDescriptorClient |
45 , public ContextLifecycleObserver { | 45 , public ContextLifecycleObserver { |
46 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaStream); | 46 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaStream); |
47 USING_GARBAGE_COLLECTED_MIXIN(MediaStream); | 47 USING_GARBAGE_COLLECTED_MIXIN(MediaStream); |
48 DEFINE_WRAPPERTYPEINFO(); | 48 DEFINE_WRAPPERTYPEINFO(); |
49 public: | 49 public: |
50 static MediaStream* create(ExecutionContext*); | 50 static MediaStream* create(ExecutionContext*); |
51 static MediaStream* create(ExecutionContext*, MediaStream*); | 51 static MediaStream* create(ExecutionContext*, MediaStream*); |
(...skipping 30 matching lines...) Expand all Loading... |
82 // EventTarget | 82 // EventTarget |
83 const AtomicString& interfaceName() const override; | 83 const AtomicString& interfaceName() const override; |
84 ExecutionContext* executionContext() const override; | 84 ExecutionContext* executionContext() const override; |
85 | 85 |
86 // URLRegistrable | 86 // URLRegistrable |
87 URLRegistry& registry() const override; | 87 URLRegistry& registry() const override; |
88 | 88 |
89 DECLARE_VIRTUAL_TRACE(); | 89 DECLARE_VIRTUAL_TRACE(); |
90 | 90 |
91 private: | 91 private: |
| 92 friend class CanvasCaptureMediaStream; |
| 93 |
92 MediaStream(ExecutionContext*, MediaStreamDescriptor*); | 94 MediaStream(ExecutionContext*, MediaStreamDescriptor*); |
93 MediaStream(ExecutionContext*, const MediaStreamTrackVector& audioTracks, co
nst MediaStreamTrackVector& videoTracks); | 95 MediaStream(ExecutionContext*, const MediaStreamTrackVector& audioTracks, co
nst MediaStreamTrackVector& videoTracks); |
94 | 96 |
95 // ContextLifecycleObserver | 97 // ContextLifecycleObserver |
96 void contextDestroyed() override; | 98 void contextDestroyed() override; |
97 | 99 |
98 // MediaStreamDescriptorClient | 100 // MediaStreamDescriptorClient |
99 void addRemoteTrack(MediaStreamComponent*) override; | 101 void addRemoteTrack(MediaStreamComponent*) override; |
100 void removeRemoteTrack(MediaStreamComponent*) override; | 102 void removeRemoteTrack(MediaStreamComponent*) override; |
101 | 103 |
(...skipping 10 matching lines...) Expand all Loading... |
112 | 114 |
113 Timer<MediaStream> m_scheduledEventTimer; | 115 Timer<MediaStream> m_scheduledEventTimer; |
114 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; | 116 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; |
115 }; | 117 }; |
116 | 118 |
117 typedef HeapVector<Member<MediaStream>> MediaStreamVector; | 119 typedef HeapVector<Member<MediaStream>> MediaStreamVector; |
118 | 120 |
119 } // namespace blink | 121 } // namespace blink |
120 | 122 |
121 #endif // MediaStream_h | 123 #endif // MediaStream_h |
OLD | NEW |