Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h

Issue 1671033002: Do not let go of MediaStreamTracks too early. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 bool ended() const; 77 bool ended() const;
78 78
79 void registerMediaStream(MediaStream*); 79 void registerMediaStream(MediaStream*);
80 void unregisterMediaStream(MediaStream*); 80 void unregisterMediaStream(MediaStream*);
81 81
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 // ActiveDOMObject 86 // ActiveDOMObject
87 bool hasPendingActivity() const override;
87 void stop() override; 88 void stop() override;
88 89
89 PassOwnPtr<AudioSourceProvider> createWebAudioSource(); 90 PassOwnPtr<AudioSourceProvider> createWebAudioSource();
90 91
91 DECLARE_VIRTUAL_TRACE(); 92 DECLARE_VIRTUAL_TRACE();
92 93
93 private: 94 private:
94 friend class CanvasCaptureMediaStreamTrack; 95 friend class CanvasCaptureMediaStreamTrack;
95 96
96 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*); 97 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*);
97 98
98 // MediaStreamSourceObserver 99 // MediaStreamSourceObserver
99 void sourceChangedState() override; 100 void sourceChangedState() override;
100 101
101 void propagateTrackEnded(); 102 void propagateTrackEnded();
102 103
103 MediaStreamSource::ReadyState m_readyState; 104 MediaStreamSource::ReadyState m_readyState;
104 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams; 105 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams;
105 bool m_isIteratingRegisteredMediaStreams; 106 bool m_isIteratingRegisteredMediaStreams;
106 bool m_stopped; 107 bool m_stopped;
107 Member<MediaStreamComponent> m_component; 108 Member<MediaStreamComponent> m_component;
108 }; 109 };
109 110
110 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector; 111 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector;
111 112
112 } // namespace blink 113 } // namespace blink
113 114
114 #endif // MediaStreamTrack_h 115 #endif // MediaStreamTrack_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698