| OLD | NEW |
| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 { | 156 { |
| 157 if (m_controller) | 157 if (m_controller) |
| 158 m_controller->requestUserMedia(this); | 158 m_controller->requestUserMedia(this); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) | 161 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) |
| 162 { | 162 { |
| 163 if (!getExecutionContext()) | 163 if (!getExecutionContext()) |
| 164 return; | 164 return; |
| 165 | 165 |
| 166 RefPtrWillBeRawPtr<MediaStream> stream = MediaStream::create(getExecutionCon
text(), streamDescriptor); | 166 RawPtr<MediaStream> stream = MediaStream::create(getExecutionContext(), stre
amDescriptor); |
| 167 | 167 |
| 168 MediaStreamTrackVector audioTracks = stream->getAudioTracks(); | 168 MediaStreamTrackVector audioTracks = stream->getAudioTracks(); |
| 169 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au
dioTracks.end(); ++iter) { | 169 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au
dioTracks.end(); ++iter) { |
| 170 (*iter)->component()->source()->setConstraints(m_audio); | 170 (*iter)->component()->source()->setConstraints(m_audio); |
| 171 } | 171 } |
| 172 | 172 |
| 173 MediaStreamTrackVector videoTracks = stream->getVideoTracks(); | 173 MediaStreamTrackVector videoTracks = stream->getVideoTracks(); |
| 174 for (MediaStreamTrackVector::iterator iter = videoTracks.begin(); iter != vi
deoTracks.end(); ++iter) { | 174 for (MediaStreamTrackVector::iterator iter = videoTracks.begin(); iter != vi
deoTracks.end(); ++iter) { |
| 175 (*iter)->component()->source()->setConstraints(m_video); | 175 (*iter)->component()->source()->setConstraints(m_video); |
| 176 } | 176 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 DEFINE_TRACE(UserMediaRequest) | 214 DEFINE_TRACE(UserMediaRequest) |
| 215 { | 215 { |
| 216 visitor->trace(m_controller); | 216 visitor->trace(m_controller); |
| 217 visitor->trace(m_successCallback); | 217 visitor->trace(m_successCallback); |
| 218 visitor->trace(m_errorCallback); | 218 visitor->trace(m_errorCallback); |
| 219 ContextLifecycleObserver::trace(visitor); | 219 ContextLifecycleObserver::trace(visitor); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |