| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTRA_DATA_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/common/media/media_stream_options.h" | 10 #include "content/common/media/media_stream_options.h" |
| 11 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" | 11 #include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc
e.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc
e.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class CONTENT_EXPORT MediaStreamSourceExtraData | 16 class CONTENT_EXPORT MediaStreamSourceExtraData |
| 17 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamSource::ExtraData) { | 17 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamSource::ExtraData) { |
| 18 public: | 18 public: |
| 19 explicit MediaStreamSourceExtraData( | 19 explicit MediaStreamSourceExtraData( |
| 20 const media_stream::StreamDeviceInfo& device_info); | 20 const StreamDeviceInfo& device_info); |
| 21 virtual ~MediaStreamSourceExtraData(); | 21 virtual ~MediaStreamSourceExtraData(); |
| 22 | 22 |
| 23 // Return device information about the camera or microphone. | 23 // Return device information about the camera or microphone. |
| 24 const media_stream::StreamDeviceInfo& device_info() const { | 24 const StreamDeviceInfo& device_info() const { |
| 25 return device_info_; | 25 return device_info_; |
| 26 } | 26 } |
| 27 | 27 |
| 28 void SetVideoSource(webrtc::VideoSourceInterface* source) { | 28 void SetVideoSource(webrtc::VideoSourceInterface* source) { |
| 29 video_source_ = source; | 29 video_source_ = source; |
| 30 } | 30 } |
| 31 | 31 |
| 32 webrtc::VideoSourceInterface* video_source() { return video_source_; } | 32 webrtc::VideoSourceInterface* video_source() { return video_source_; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 media_stream::StreamDeviceInfo device_info_; | 35 StreamDeviceInfo device_info_; |
| 36 scoped_refptr<webrtc::VideoSourceInterface> video_source_; | 36 scoped_refptr<webrtc::VideoSourceInterface> video_source_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); | 38 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace content | 41 } // namespace content |
| 42 | 42 |
| 43 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ | 43 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ |
| OLD | NEW |