| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(PassRefPtr<MediaStreamDescriptor> streamDescripto
r) | 152 void UserMediaRequest::succeed(MediaStreamDescriptor* streamDescriptor) |
| 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 Loading... |
| 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 |
| OLD | NEW |