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

Side by Side Diff: third_party/WebKit/Source/platform/mediastream/MediaStreamDescriptor.h

Issue 2140133005: Remove MediaStream ended event from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void addComponent(MediaStreamComponent*); 80 void addComponent(MediaStreamComponent*);
81 void removeComponent(MediaStreamComponent*); 81 void removeComponent(MediaStreamComponent*);
82 82
83 void addRemoteTrack(MediaStreamComponent*); 83 void addRemoteTrack(MediaStreamComponent*);
84 void removeRemoteTrack(MediaStreamComponent*); 84 void removeRemoteTrack(MediaStreamComponent*);
85 85
86 bool active() const { return m_active; } 86 bool active() const { return m_active; }
87 void setActive(bool active) { m_active = active; } 87 void setActive(bool active) { m_active = active; }
88 88
89 bool ended() const { return m_ended; }
90 void setEnded() { m_ended = true; }
91
92 ExtraData* getExtraData() const { return m_extraData.get(); } 89 ExtraData* getExtraData() const { return m_extraData.get(); }
93 void setExtraData(std::unique_ptr<ExtraData> extraData) { m_extraData = std: :move(extraData); } 90 void setExtraData(std::unique_ptr<ExtraData> extraData) { m_extraData = std: :move(extraData); }
94 91
95 // |m_extraData| may hold pointers to GC objects, and it may touch them in d estruction. 92 // |m_extraData| may hold pointers to GC objects, and it may touch them in d estruction.
96 // So this class is eagerly finalized to finalize |m_extraData| promptly. 93 // So this class is eagerly finalized to finalize |m_extraData| promptly.
97 EAGERLY_FINALIZE(); 94 EAGERLY_FINALIZE();
98 DECLARE_TRACE(); 95 DECLARE_TRACE();
99 96
100 private: 97 private:
101 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio Sources, const MediaStreamSourceVector& videoSources); 98 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio Sources, const MediaStreamSourceVector& videoSources);
102 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au dioComponents, const MediaStreamComponentVector& videoComponents); 99 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au dioComponents, const MediaStreamComponentVector& videoComponents);
103 100
104 Member<MediaStreamDescriptorClient> m_client; 101 Member<MediaStreamDescriptorClient> m_client;
105 String m_id; 102 String m_id;
106 HeapVector<Member<MediaStreamComponent>> m_audioComponents; 103 HeapVector<Member<MediaStreamComponent>> m_audioComponents;
107 HeapVector<Member<MediaStreamComponent>> m_videoComponents; 104 HeapVector<Member<MediaStreamComponent>> m_videoComponents;
108 bool m_active; 105 bool m_active;
109 bool m_ended;
110 106
111 std::unique_ptr<ExtraData> m_extraData; 107 std::unique_ptr<ExtraData> m_extraData;
112 }; 108 };
113 109
114 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector; 110 typedef HeapVector<Member<MediaStreamDescriptor>> MediaStreamDescriptorVector;
115 111
116 } // namespace blink 112 } // namespace blink
117 113
118 #endif // MediaStreamDescriptor_h 114 #endif // MediaStreamDescriptor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698