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

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

Issue 2767963002: Revert of 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,
74 ReadyState = ReadyStateLive, 75 ReadyState = ReadyStateLive,
75 bool requiresConsumer = false); 76 bool requiresConsumer = false);
76 77
77 const String& id() const { return m_id; } 78 const String& id() const { return m_id; }
78 StreamType type() const { return m_type; } 79 StreamType type() const { return m_type; }
79 const String& name() const { return m_name; } 80 const String& name() const { return m_name; }
81 bool remote() const { return m_remote; }
80 82
81 void setReadyState(ReadyState); 83 void setReadyState(ReadyState);
82 ReadyState getReadyState() const { return m_readyState; } 84 ReadyState getReadyState() const { return m_readyState; }
83 85
84 void addObserver(Observer*); 86 void addObserver(Observer*);
85 87
86 ExtraData* getExtraData() const { return m_extraData.get(); } 88 ExtraData* getExtraData() const { return m_extraData.get(); }
87 void setExtraData(std::unique_ptr<ExtraData> extraData) { 89 void setExtraData(std::unique_ptr<ExtraData> extraData) {
88 m_extraData = std::move(extraData); 90 m_extraData = std::move(extraData);
89 } 91 }
(...skipping 17 matching lines...) Expand all
107 // |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
108 // destruction. So this class is eagerly finalized to finalize |m_extraData| 110 // destruction. So this class is eagerly finalized to finalize |m_extraData|
109 // promptly. 111 // promptly.
110 EAGERLY_FINALIZE(); 112 EAGERLY_FINALIZE();
111 DECLARE_TRACE(); 113 DECLARE_TRACE();
112 114
113 private: 115 private:
114 MediaStreamSource(const String& id, 116 MediaStreamSource(const String& id,
115 StreamType, 117 StreamType,
116 const String& name, 118 const String& name,
119 bool remote,
117 ReadyState, 120 ReadyState,
118 bool requiresConsumer); 121 bool requiresConsumer);
119 122
120 String m_id; 123 String m_id;
121 StreamType m_type; 124 StreamType m_type;
122 String m_name; 125 String m_name;
126 bool m_remote;
123 ReadyState m_readyState; 127 ReadyState m_readyState;
124 bool m_requiresConsumer; 128 bool m_requiresConsumer;
125 HeapHashSet<WeakMember<Observer>> m_observers; 129 HeapHashSet<WeakMember<Observer>> m_observers;
126 Mutex m_audioConsumersLock; 130 Mutex m_audioConsumersLock;
127 HashSet<AudioDestinationConsumer*> m_audioConsumers; 131 HashSet<AudioDestinationConsumer*> m_audioConsumers;
128 std::unique_ptr<ExtraData> m_extraData; 132 std::unique_ptr<ExtraData> m_extraData;
129 WebMediaConstraints m_constraints; 133 WebMediaConstraints m_constraints;
130 }; 134 };
131 135
132 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector; 136 typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector;
133 137
134 } // namespace blink 138 } // namespace blink
135 139
136 #endif // MediaStreamSource_h 140 #endif // MediaStreamSource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698