| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MEDIA_STREAM_SOURCE_OBSERVER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 12 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" |
| 13 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 13 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class MediaStreamSourceExtraData; | 17 class MediaStreamSource; |
| 18 | 18 |
| 19 // MediaStreamSourceObserver listens to events on MediaSourceInterface and | 19 // MediaStreamSourceObserver listens to events on MediaSourceInterface and |
| 20 // notify WebKit. It will be owned by MediaStreamSourceExtraData. | 20 // notify WebKit. It will be owned by MediaStreamSource. |
| 21 class CONTENT_EXPORT MediaStreamSourceObserver | 21 class CONTENT_EXPORT MediaStreamSourceObserver |
| 22 : NON_EXPORTED_BASE(public webrtc::ObserverInterface), | 22 : NON_EXPORTED_BASE(public webrtc::ObserverInterface), |
| 23 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 23 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 24 public: | 24 public: |
| 25 MediaStreamSourceObserver(webrtc::MediaSourceInterface* webrtc_source, | 25 MediaStreamSourceObserver(webrtc::MediaSourceInterface* webrtc_source, |
| 26 MediaStreamSourceExtraData* extra_data); | 26 MediaStreamSource* extra_data); |
| 27 virtual ~MediaStreamSourceObserver(); | 27 virtual ~MediaStreamSourceObserver(); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // webrtc::ObserverInterface implementation. | 30 // webrtc::ObserverInterface implementation. |
| 31 virtual void OnChanged() OVERRIDE; | 31 virtual void OnChanged() OVERRIDE; |
| 32 | 32 |
| 33 webrtc::MediaSourceInterface::SourceState state_; | 33 webrtc::MediaSourceInterface::SourceState state_; |
| 34 scoped_refptr<webrtc::MediaSourceInterface> webrtc_source_; | 34 scoped_refptr<webrtc::MediaSourceInterface> webrtc_source_; |
| 35 MediaStreamSourceExtraData* extra_data_; | 35 MediaStreamSource* extra_data_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceObserver); | 37 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceObserver); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace content | 40 } // namespace content |
| 41 | 41 |
| 42 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_ | 42 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_ |
| OLD | NEW |