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

Side by Side Diff: content/renderer/media/media_stream_video_source.h

Issue 509873002: Refactor MediaStreamTrack video onmute event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 6 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Trigger all cached callbacks from AddTrack. AddTrack is successful 142 // Trigger all cached callbacks from AddTrack. AddTrack is successful
143 // if the capture delegate has started and the constraints provided in 143 // if the capture delegate has started and the constraints provided in
144 // AddTrack match the format that was used to start the device. 144 // AddTrack match the format that was used to start the device.
145 // Note that it must be ok to delete the MediaStreamVideoSource object 145 // Note that it must be ok to delete the MediaStreamVideoSource object
146 // in the context of the callback. If gUM fail, the implementation will 146 // in the context of the callback. If gUM fail, the implementation will
147 // simply drop the references to the blink source and track which will lead 147 // simply drop the references to the blink source and track which will lead
148 // to that this object is deleted. 148 // to that this object is deleted.
149 void FinalizeAddTrack(); 149 void FinalizeAddTrack();
150 150
151 State state_; 151 State state_;
152 bool muted_state_;
153 152
154 media::VideoCaptureFormat current_format_; 153 media::VideoCaptureFormat current_format_;
155 154
156 struct RequestedConstraints { 155 struct RequestedConstraints {
157 RequestedConstraints(MediaStreamVideoTrack* track, 156 RequestedConstraints(MediaStreamVideoTrack* track,
158 const VideoCaptureDeliverFrameCB& frame_callback, 157 const VideoCaptureDeliverFrameCB& frame_callback,
159 const blink::WebMediaConstraints& constraints, 158 const blink::WebMediaConstraints& constraints,
160 const ConstraintsCallback& callback); 159 const ConstraintsCallback& callback);
161 ~RequestedConstraints(); 160 ~RequestedConstraints();
162 161
(...skipping 14 matching lines...) Expand all
177 176
178 // NOTE: Weak pointers must be invalidated before all other member variables. 177 // NOTE: Weak pointers must be invalidated before all other member variables.
179 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; 178 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_;
180 179
181 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 180 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
182 }; 181 };
183 182
184 } // namespace content 183 } // namespace content
185 184
186 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 185 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_track.cc ('k') | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698