| 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 #if DCHECK_IS_ON |
| 49 bool source_set_; |
| 50 #endif |
| 48 const scoped_refptr<webrtc::VideoTrackInterface> track_; | 51 const scoped_refptr<webrtc::VideoTrackInterface> track_; |
| 49 webrtc::MediaStreamTrackInterface::TrackState state_; | 52 webrtc::MediaStreamTrackInterface::TrackState state_; |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 MediaStreamRemoteVideoSource(const scoped_refptr<Observer>& observer); | 55 MediaStreamRemoteVideoSource(const scoped_refptr<Observer>& observer); |
| 53 virtual ~MediaStreamRemoteVideoSource(); | 56 virtual ~MediaStreamRemoteVideoSource(); |
| 54 | 57 |
| 55 protected: | 58 protected: |
| 56 // Implements MediaStreamVideoSource. | 59 // Implements MediaStreamVideoSource. |
| 57 void GetCurrentSupportedFormats( | 60 void GetCurrentSupportedFormats( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 81 class RemoteVideoSourceDelegate; | 84 class RemoteVideoSourceDelegate; |
| 82 scoped_refptr<RemoteVideoSourceDelegate> delegate_; | 85 scoped_refptr<RemoteVideoSourceDelegate> delegate_; |
| 83 base::WeakPtrFactory<MediaStreamRemoteVideoSource> weak_factory_; | 86 base::WeakPtrFactory<MediaStreamRemoteVideoSource> weak_factory_; |
| 84 | 87 |
| 85 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); | 88 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); |
| 86 }; | 89 }; |
| 87 | 90 |
| 88 } // namespace content | 91 } // namespace content |
| 89 | 92 |
| 90 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 93 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
| OLD | NEW |