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

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

Issue 2723433002: Remove |remote| and |readonly| members of MediaStreamTrack. (Closed)
Patch Set: rebase Created 3 years, 9 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 enum ReadyState { 65 enum ReadyState {
66 ReadyStateLive = 0, 66 ReadyStateLive = 0,
67 ReadyStateMuted = 1, 67 ReadyStateMuted = 1,
68 ReadyStateEnded = 2 68 ReadyStateEnded = 2
69 }; 69 };
70 70
71 static MediaStreamSource* create(const String& id, 71 static MediaStreamSource* create(const String& id,
72 StreamType, 72 StreamType,
73 const String& name, 73 const String& name,
74 bool remote,
75 ReadyState = ReadyStateLive, 74 ReadyState = ReadyStateLive,
76 bool requiresConsumer = false); 75 bool requiresConsumer = false);
77 76
78 ~MediaStreamSource(); 77 ~MediaStreamSource();
79 78
80 const String& id() const { return m_id; } 79 const String& id() const { return m_id; }
81 StreamType type() const { return m_type; } 80 StreamType type() const { return m_type; }
82 const String& name() const { return m_name; } 81 const String& name() const { return m_name; }
83 bool remote() const { return m_remote; }
84 82
85 void setReadyState(ReadyState); 83 void setReadyState(ReadyState);
86 ReadyState getReadyState() const { return m_readyState; } 84 ReadyState getReadyState() const { return m_readyState; }
87 85
88 void addObserver(Observer*); 86 void addObserver(Observer*);
89 87
90 ExtraData* getExtraData() const { return m_extraData.get(); } 88 ExtraData* getExtraData() const { return m_extraData.get(); }
91 void setExtraData(std::unique_ptr<ExtraData> extraData) { 89 void setExtraData(std::unique_ptr<ExtraData> extraData) {
92 m_extraData = std::move(extraData); 90 m_extraData = std::move(extraData);
93 } 91 }
(...skipping 17 matching lines...) Expand all
111 // |m_extraData| may hold pointers to GC objects, and it may touch them in 109 // |m_extraData| may hold pointers to GC objects, and it may touch them in
112 // destruction. So this class is eagerly finalized to finalize |m_extraData| 110 // destruction. So this class is eagerly finalized to finalize |m_extraData|
113 // promptly. 111 // promptly.
114 EAGERLY_FINALIZE(); 112 EAGERLY_FINALIZE();
115 DECLARE_TRACE(); 113 DECLARE_TRACE();
116 114
117 private: 115 private:
118 MediaStreamSource(const String& id, 116 MediaStreamSource(const String& id,
119 StreamType, 117 StreamType,
120 const String& name, 118 const String& name,
121 bool remote,
122 ReadyState, 119 ReadyState,
123 bool requiresConsumer); 120 bool requiresConsumer);
124 121
125 String m_id; 122 String m_id;
126 StreamType m_type; 123 StreamType m_type;
127 String m_name; 124 String m_name;
128 bool m_remote;
129 ReadyState m_readyState; 125 ReadyState m_readyState;
130 bool m_requiresConsumer; 126 bool m_requiresConsumer;
131 HeapHashSet<WeakMember<Observer>> m_observers; 127 HeapHashSet<WeakMember<Observer>> m_observers;
132 Mutex m_audioConsumersLock; 128 Mutex m_audioConsumersLock;
133 HeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers; 129 HeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers;
134 std::unique_ptr<ExtraData> m_extraData; 130 std::unique_ptr<ExtraData> m_extraData;
135 WebMediaConstraints m_constraints; 131 WebMediaConstraints m_constraints;
136 }; 132 };
137 133
138 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector; 134 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector;
139 135
140 } // namespace blink 136 } // namespace blink
141 137
142 #endif // MediaStreamSource_h 138 #endif // MediaStreamSource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698