| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "content/renderer/media/media_stream_track.h" | 5 #include "content/renderer/media/media_stream_track.h" | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 8 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 
| 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 
| 10 | 10 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24 } | 24 } | 
| 25 | 25 | 
| 26 MediaStreamTrack::~MediaStreamTrack() { | 26 MediaStreamTrack::~MediaStreamTrack() { | 
| 27 } | 27 } | 
| 28 | 28 | 
| 29 void MediaStreamTrack::SetEnabled(bool enabled) { | 29 void MediaStreamTrack::SetEnabled(bool enabled) { | 
| 30   if (track_) | 30   if (track_) | 
| 31     track_->set_enabled(enabled); | 31     track_->set_enabled(enabled); | 
| 32 } | 32 } | 
| 33 | 33 | 
|  | 34 void MediaStreamTrack::StopTrack() { | 
|  | 35   // StopTrack means that a track should be stopped permanently. But | 
|  | 36   // since there is no proper way of doing that on a remote track, we can | 
|  | 37   // at least disable the track. Blink will not call down to the content layer | 
|  | 38   // after a track has been stopped. | 
|  | 39   if (track_) | 
|  | 40     track_->set_enabled(false); | 
|  | 41 } | 
|  | 42 | 
| 34 webrtc::AudioTrackInterface* MediaStreamTrack::GetAudioAdapter() { | 43 webrtc::AudioTrackInterface* MediaStreamTrack::GetAudioAdapter() { | 
| 35   return static_cast<webrtc::AudioTrackInterface*>(track_.get()); | 44   return static_cast<webrtc::AudioTrackInterface*>(track_.get()); | 
| 36 } | 45 } | 
| 37 | 46 | 
| 38 webrtc::VideoTrackInterface* MediaStreamTrack::GetVideoAdapter() { | 47 webrtc::VideoTrackInterface* MediaStreamTrack::GetVideoAdapter() { | 
| 39   NOTREACHED(); | 48   NOTREACHED(); | 
| 40   return NULL; | 49   return NULL; | 
| 41 } | 50 } | 
| 42 | 51 | 
| 43 }  // namespace content | 52 }  // namespace content | 
| OLD | NEW | 
|---|