| 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 24 matching lines...) Expand all Loading... |
| 35 #include "platform/mediastream/MediaStreamDescriptor.h" | 35 #include "platform/mediastream/MediaStreamDescriptor.h" |
| 36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class ExceptionState; | 41 class ExceptionState; |
| 42 | 42 |
| 43 class MediaStream FINAL : public RefCountedWillBeRefCountedGarbageCollected<Medi
aStream>, public ScriptWrappable, | 43 class MediaStream FINAL : public RefCountedWillBeRefCountedGarbageCollected<Medi
aStream>, public ScriptWrappable, |
| 44 public URLRegistrable, public MediaStreamDescriptorClient, public EventTarge
tWithInlineData, public ContextLifecycleObserver { | 44 public URLRegistrable, public MediaStreamDescriptorClient, public EventTarge
tWithInlineData, public ContextLifecycleObserver { |
| 45 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<M
ediaStream>); | 45 REFCOUNTED_EVENT_TARGET(MediaStream); |
| 46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaStream); |
| 46 public: | 47 public: |
| 47 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*); | 48 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*); |
| 48 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, PassRef
PtrWillBeRawPtr<MediaStream>); | 49 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, PassRef
PtrWillBeRawPtr<MediaStream>); |
| 49 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, const M
ediaStreamTrackVector&); | 50 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, const M
ediaStreamTrackVector&); |
| 50 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, PassRef
Ptr<MediaStreamDescriptor>); | 51 static PassRefPtrWillBeRawPtr<MediaStream> create(ExecutionContext*, PassRef
Ptr<MediaStreamDescriptor>); |
| 51 virtual ~MediaStream(); | 52 virtual ~MediaStream(); |
| 52 | 53 |
| 53 // DEPRECATED | 54 // DEPRECATED |
| 54 String label() const { return m_descriptor->id(); } | 55 String label() const { return m_descriptor->id(); } |
| 55 | 56 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 77 | 78 |
| 78 MediaStreamDescriptor* descriptor() const { return m_descriptor.get(); } | 79 MediaStreamDescriptor* descriptor() const { return m_descriptor.get(); } |
| 79 | 80 |
| 80 // EventTarget | 81 // EventTarget |
| 81 virtual const AtomicString& interfaceName() const OVERRIDE; | 82 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 82 virtual ExecutionContext* executionContext() const OVERRIDE; | 83 virtual ExecutionContext* executionContext() const OVERRIDE; |
| 83 | 84 |
| 84 // URLRegistrable | 85 // URLRegistrable |
| 85 virtual URLRegistry& registry() const OVERRIDE; | 86 virtual URLRegistry& registry() const OVERRIDE; |
| 86 | 87 |
| 87 void trace(Visitor*); | 88 virtual void trace(Visitor*) OVERRIDE; |
| 88 | 89 |
| 89 private: | 90 private: |
| 90 MediaStream(ExecutionContext*, PassRefPtr<MediaStreamDescriptor>); | 91 MediaStream(ExecutionContext*, PassRefPtr<MediaStreamDescriptor>); |
| 91 MediaStream(ExecutionContext*, const MediaStreamTrackVector& audioTracks, co
nst MediaStreamTrackVector& videoTracks); | 92 MediaStream(ExecutionContext*, const MediaStreamTrackVector& audioTracks, co
nst MediaStreamTrackVector& videoTracks); |
| 92 | 93 |
| 93 // ContextLifecycleObserver | 94 // ContextLifecycleObserver |
| 94 virtual void contextDestroyed() OVERRIDE; | 95 virtual void contextDestroyed() OVERRIDE; |
| 95 | 96 |
| 96 // MediaStreamDescriptorClient | 97 // MediaStreamDescriptorClient |
| 97 virtual void addRemoteTrack(MediaStreamComponent*) OVERRIDE; | 98 virtual void addRemoteTrack(MediaStreamComponent*) OVERRIDE; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 108 | 109 |
| 109 Timer<MediaStream> m_scheduledEventTimer; | 110 Timer<MediaStream> m_scheduledEventTimer; |
| 110 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; | 111 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 typedef WillBeHeapVector<RefPtrWillBeMember<MediaStream> > MediaStreamVector; | 114 typedef WillBeHeapVector<RefPtrWillBeMember<MediaStream> > MediaStreamVector; |
| 114 | 115 |
| 115 } // namespace WebCore | 116 } // namespace WebCore |
| 116 | 117 |
| 117 #endif // MediaStream_h | 118 #endif // MediaStream_h |
| OLD | NEW |