| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  132   if (ended()) |  132   if (ended()) | 
|  133     return; |  133     return; | 
|  134  |  134  | 
|  135   m_readyState = MediaStreamSource::ReadyStateEnded; |  135   m_readyState = MediaStreamSource::ReadyStateEnded; | 
|  136   MediaStreamCenter::instance().didStopMediaStreamTrack(component()); |  136   MediaStreamCenter::instance().didStopMediaStreamTrack(component()); | 
|  137   dispatchEvent(Event::create(EventTypeNames::ended)); |  137   dispatchEvent(Event::create(EventTypeNames::ended)); | 
|  138   propagateTrackEnded(); |  138   propagateTrackEnded(); | 
|  139 } |  139 } | 
|  140  |  140  | 
|  141 MediaStreamTrack* MediaStreamTrack::clone(ExecutionContext* context) { |  141 MediaStreamTrack* MediaStreamTrack::clone(ExecutionContext* context) { | 
|  142   MediaStreamComponent* clonedComponent = |  142   // TODO(pbos): Make sure m_readyState and m_stopped carries over on cloned | 
|  143       MediaStreamComponent::create(component()->source()); |  143   // tracks. | 
 |  144   MediaStreamComponent* clonedComponent = component()->clone(); | 
|  144   MediaStreamTrack* clonedTrack = |  145   MediaStreamTrack* clonedTrack = | 
|  145       MediaStreamTrack::create(context, clonedComponent); |  146       MediaStreamTrack::create(context, clonedComponent); | 
|  146   MediaStreamCenter::instance().didCreateMediaStreamTrack(clonedComponent); |  147   MediaStreamCenter::instance().didCreateMediaStreamTrack(clonedComponent); | 
|  147   return clonedTrack; |  148   return clonedTrack; | 
|  148 } |  149 } | 
|  149  |  150  | 
|  150 void MediaStreamTrack::getConstraints(MediaTrackConstraints& constraints) { |  151 void MediaStreamTrack::getConstraints(MediaTrackConstraints& constraints) { | 
|  151   MediaConstraintsImpl::convertConstraints(m_constraints, constraints); |  152   MediaConstraintsImpl::convertConstraints(m_constraints, constraints); | 
|  152 } |  153 } | 
|  153  |  154  | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  253 } |  254 } | 
|  254  |  255  | 
|  255 DEFINE_TRACE(MediaStreamTrack) { |  256 DEFINE_TRACE(MediaStreamTrack) { | 
|  256   visitor->trace(m_registeredMediaStreams); |  257   visitor->trace(m_registeredMediaStreams); | 
|  257   visitor->trace(m_component); |  258   visitor->trace(m_component); | 
|  258   EventTargetWithInlineData::trace(visitor); |  259   EventTargetWithInlineData::trace(visitor); | 
|  259   ActiveDOMObject::trace(visitor); |  260   ActiveDOMObject::trace(visitor); | 
|  260 } |  261 } | 
|  261  |  262  | 
|  262 }  // namespace blink |  263 }  // namespace blink | 
| OLD | NEW |