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.h" | 5 #include "content/renderer/media/media_stream.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
9 | 11 |
10 namespace content { | 12 namespace content { |
11 | 13 |
12 // static | 14 // static |
13 MediaStream* MediaStream::GetMediaStream( | 15 MediaStream* MediaStream::GetMediaStream( |
14 const blink::WebMediaStream& stream) { | 16 const blink::WebMediaStream& stream) { |
15 return static_cast<MediaStream*>(stream.extraData()); | 17 return static_cast<MediaStream*>(stream.extraData()); |
16 } | 18 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 bool MediaStream::RemoveTrack(const blink::WebMediaStreamTrack& track) { | 51 bool MediaStream::RemoveTrack(const blink::WebMediaStreamTrack& track) { |
50 DCHECK(thread_checker_.CalledOnValidThread()); | 52 DCHECK(thread_checker_.CalledOnValidThread()); |
51 for (std::vector<MediaStreamObserver*>::iterator it = observers_.begin(); | 53 for (std::vector<MediaStreamObserver*>::iterator it = observers_.begin(); |
52 it != observers_.end(); ++it) { | 54 it != observers_.end(); ++it) { |
53 (*it)->TrackRemoved(track); | 55 (*it)->TrackRemoved(track); |
54 } | 56 } |
55 return true; | 57 return true; |
56 } | 58 } |
57 | 59 |
58 } // namespace content | 60 } // namespace content |
OLD | NEW |