| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 MediaStreamCenter::Instance().DidStopMediaStreamTrack(Component()); | 204 MediaStreamCenter::Instance().DidStopMediaStreamTrack(Component()); |
| 205 DispatchEvent(Event::Create(EventTypeNames::ended)); | 205 DispatchEvent(Event::Create(EventTypeNames::ended)); |
| 206 PropagateTrackEnded(); | 206 PropagateTrackEnded(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 MediaStreamTrack* MediaStreamTrack::clone(ScriptState* script_state) { | 209 MediaStreamTrack* MediaStreamTrack::clone(ScriptState* script_state) { |
| 210 // TODO(pbos): Make sure m_readyState and m_stopped carries over on cloned | 210 // TODO(pbos): Make sure m_readyState and m_stopped carries over on cloned |
| 211 // tracks. | 211 // tracks. |
| 212 MediaStreamComponent* cloned_component = Component()->Clone(); | 212 MediaStreamComponent* cloned_component = Component()->Clone(); |
| 213 MediaStreamTrack* cloned_track = MediaStreamTrack::Create( | 213 MediaStreamTrack* cloned_track = MediaStreamTrack::Create( |
| 214 script_state->GetExecutionContext(), cloned_component); | 214 ExecutionContext::From(script_state), cloned_component); |
| 215 MediaStreamCenter::Instance().DidCloneMediaStreamTrack(Component(), | 215 MediaStreamCenter::Instance().DidCloneMediaStreamTrack(Component(), |
| 216 cloned_component); | 216 cloned_component); |
| 217 return cloned_track; | 217 return cloned_track; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void MediaStreamTrack::SetConstraints(const WebMediaConstraints& constraints) { | 220 void MediaStreamTrack::SetConstraints(const WebMediaConstraints& constraints) { |
| 221 constraints_ = constraints; | 221 constraints_ = constraints; |
| 222 } | 222 } |
| 223 | 223 |
| 224 void MediaStreamTrack::getCapabilities(MediaTrackCapabilities& capabilities) { | 224 void MediaStreamTrack::getCapabilities(MediaTrackCapabilities& capabilities) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 409 |
| 410 DEFINE_TRACE(MediaStreamTrack) { | 410 DEFINE_TRACE(MediaStreamTrack) { |
| 411 visitor->Trace(registered_media_streams_); | 411 visitor->Trace(registered_media_streams_); |
| 412 visitor->Trace(component_); | 412 visitor->Trace(component_); |
| 413 visitor->Trace(image_capture_); | 413 visitor->Trace(image_capture_); |
| 414 EventTargetWithInlineData::Trace(visitor); | 414 EventTargetWithInlineData::Trace(visitor); |
| 415 ContextLifecycleObserver::Trace(visitor); | 415 ContextLifecycleObserver::Trace(visitor); |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |