| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 { | 151 { |
| 152 if (m_controller) | 152 if (m_controller) |
| 153 m_controller->requestUserMedia(this); | 153 m_controller->requestUserMedia(this); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) | 156 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) |
| 157 { | 157 { |
| 158 if (!executionContext()) | 158 if (!executionContext()) |
| 159 return; | 159 return; |
| 160 | 160 |
| 161 RefPtrWillBeRawPtr<MediaStream> stream = MediaStream::create(executionContex
t(), streamDescriptor); | 161 RawPtr<MediaStream> stream = MediaStream::create(executionContext(), streamD
escriptor); |
| 162 | 162 |
| 163 MediaStreamTrackVector audioTracks = stream->getAudioTracks(); | 163 MediaStreamTrackVector audioTracks = stream->getAudioTracks(); |
| 164 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au
dioTracks.end(); ++iter) { | 164 for (MediaStreamTrackVector::iterator iter = audioTracks.begin(); iter != au
dioTracks.end(); ++iter) { |
| 165 (*iter)->component()->source()->setConstraints(m_audio); | 165 (*iter)->component()->source()->setConstraints(m_audio); |
| 166 } | 166 } |
| 167 | 167 |
| 168 MediaStreamTrackVector videoTracks = stream->getVideoTracks(); | 168 MediaStreamTrackVector videoTracks = stream->getVideoTracks(); |
| 169 for (MediaStreamTrackVector::iterator iter = videoTracks.begin(); iter != vi
deoTracks.end(); ++iter) { | 169 for (MediaStreamTrackVector::iterator iter = videoTracks.begin(); iter != vi
deoTracks.end(); ++iter) { |
| 170 (*iter)->component()->source()->setConstraints(m_video); | 170 (*iter)->component()->source()->setConstraints(m_video); |
| 171 } | 171 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 DEFINE_TRACE(UserMediaRequest) | 209 DEFINE_TRACE(UserMediaRequest) |
| 210 { | 210 { |
| 211 visitor->trace(m_controller); | 211 visitor->trace(m_controller); |
| 212 visitor->trace(m_successCallback); | 212 visitor->trace(m_successCallback); |
| 213 visitor->trace(m_errorCallback); | 213 visitor->trace(m_errorCallback); |
| 214 ContextLifecycleObserver::trace(visitor); | 214 ContextLifecycleObserver::trace(visitor); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace blink | 217 } // namespace blink |
| OLD | NEW |