Chromium Code Reviews| 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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 friend class MediaStreamRemoteVideoSource; | 38 friend class MediaStreamRemoteVideoSource; |
| 39 void SetSource(const base::WeakPtr<MediaStreamRemoteVideoSource>& source); | 39 void SetSource(const base::WeakPtr<MediaStreamRemoteVideoSource>& source); |
| 40 | 40 |
| 41 // webrtc::ObserverInterface implementation. | 41 // webrtc::ObserverInterface implementation. |
| 42 void OnChanged() override; | 42 void OnChanged() override; |
| 43 | 43 |
| 44 void OnChangedImpl(webrtc::MediaStreamTrackInterface::TrackState state); | 44 void OnChangedImpl(webrtc::MediaStreamTrackInterface::TrackState state); |
| 45 | 45 |
| 46 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; | 46 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; |
| 47 base::WeakPtr<MediaStreamRemoteVideoSource> source_; | 47 base::WeakPtr<MediaStreamRemoteVideoSource> source_; |
| 48 bool source_set_; | |
|
tommi (sloooow) - chröme
2014/11/03 13:49:56
nit:
#if DCHECK_IS_ON
bool source_set_;
#endif
| |
| 48 const scoped_refptr<webrtc::VideoTrackInterface> track_; | 49 const scoped_refptr<webrtc::VideoTrackInterface> track_; |
| 49 webrtc::MediaStreamTrackInterface::TrackState state_; | 50 webrtc::MediaStreamTrackInterface::TrackState state_; |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 MediaStreamRemoteVideoSource(const scoped_refptr<Observer>& observer); | 53 MediaStreamRemoteVideoSource(const scoped_refptr<Observer>& observer); |
| 53 virtual ~MediaStreamRemoteVideoSource(); | 54 virtual ~MediaStreamRemoteVideoSource(); |
| 54 | 55 |
| 55 protected: | 56 protected: |
| 56 // Implements MediaStreamVideoSource. | 57 // Implements MediaStreamVideoSource. |
| 57 void GetCurrentSupportedFormats( | 58 void GetCurrentSupportedFormats( |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 81 class RemoteVideoSourceDelegate; | 82 class RemoteVideoSourceDelegate; |
| 82 scoped_refptr<RemoteVideoSourceDelegate> delegate_; | 83 scoped_refptr<RemoteVideoSourceDelegate> delegate_; |
| 83 base::WeakPtrFactory<MediaStreamRemoteVideoSource> weak_factory_; | 84 base::WeakPtrFactory<MediaStreamRemoteVideoSource> weak_factory_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); | 86 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace content | 89 } // namespace content |
| 89 | 90 |
| 90 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 91 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
| OLD | NEW |