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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp

Issue 1375773004: Revert of [Oilpan] Move MediaStream{Source|Component|Descriptor} to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 return 0; 143 return 0;
144 } 144 }
145 145
146 void UserMediaRequest::start() 146 void UserMediaRequest::start()
147 { 147 {
148 if (m_controller) 148 if (m_controller)
149 m_controller->requestUserMedia(this); 149 m_controller->requestUserMedia(this);
150 } 150 }
151 151
152 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) 152 void UserMediaRequest::succeed(PassRefPtr<MediaStreamDescriptor> streamDescripto r)
153 { 153 {
154 if (!executionContext()) 154 if (!executionContext())
155 return; 155 return;
156 156
157 RefPtrWillBeRawPtr<MediaStream> stream = MediaStream::create(executionContex t(), streamDescriptor); 157 RefPtrWillBeRawPtr<MediaStream> stream = MediaStream::create(executionContex t(), streamDescriptor);
158 158
159 MediaStreamTrackVector audioTracks = stream->getAudioTracks(); 159 MediaStreamTrackVector audioTracks = stream->getAudioTracks();
160 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au dioTracks.end(); ++iter) { 160 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au dioTracks.end(); ++iter) {
161 (*iter)->component()->source()->setConstraints(m_audio); 161 (*iter)->component()->source()->setConstraints(m_audio);
162 } 162 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 DEFINE_TRACE(UserMediaRequest) 205 DEFINE_TRACE(UserMediaRequest)
206 { 206 {
207 visitor->trace(m_controller); 207 visitor->trace(m_controller);
208 visitor->trace(m_successCallback); 208 visitor->trace(m_successCallback);
209 visitor->trace(m_errorCallback); 209 visitor->trace(m_errorCallback);
210 ContextLifecycleObserver::trace(visitor); 210 ContextLifecycleObserver::trace(visitor);
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698