Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/renderer/media/media_stream_source_extra_data.h

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 28 matching lines...) Expand all
39 video_source_ = source; 39 video_source_ = source;
40 source_observer_.reset(new MediaStreamSourceObserver(source, this)); 40 source_observer_.reset(new MediaStreamSourceObserver(source, this));
41 } 41 }
42 42
43 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { 43 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) {
44 local_audio_source_ = source; 44 local_audio_source_ = source;
45 // TODO(perkj): Implement a local source observer for audio. 45 // TODO(perkj): Implement a local source observer for audio.
46 // See |source_observer_|. 46 // See |source_observer_|.
47 } 47 }
48 48
49 webrtc::VideoSourceInterface* video_source() { return video_source_; } 49 webrtc::VideoSourceInterface* video_source() { return video_source_.get(); }
50 media::AudioCapturerSource* audio_source() { return audio_source_; } 50 media::AudioCapturerSource* audio_source() { return audio_source_.get(); }
51 webrtc::AudioSourceInterface* local_audio_source() { 51 webrtc::AudioSourceInterface* local_audio_source() {
52 return local_audio_source_; 52 return local_audio_source_.get();
53 } 53 }
54 54
55 private: 55 private:
56 StreamDeviceInfo device_info_; 56 StreamDeviceInfo device_info_;
57 57
58 // TODO(tommyw): Remove |webkit_source_| after WebMediaStreamSource::Owner() 58 // TODO(tommyw): Remove |webkit_source_| after WebMediaStreamSource::Owner()
59 // is implemented, which let us fetch the 59 // is implemented, which let us fetch the
60 // WebMediaStreamSource without increasing the reference count. 60 // WebMediaStreamSource without increasing the reference count.
61 // |webkit_source_| will create a circular reference to WebMediaStreamSource. 61 // |webkit_source_| will create a circular reference to WebMediaStreamSource.
62 // WebMediaStreamSource -> MediaStreamSourceExtraData -> WebMediaStreamSource 62 // WebMediaStreamSource -> MediaStreamSourceExtraData -> WebMediaStreamSource
(...skipping 10 matching lines...) Expand all
73 // carries audio options. 73 // carries audio options.
74 scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_; 74 scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_;
75 scoped_ptr<MediaStreamSourceObserver> source_observer_; 75 scoped_ptr<MediaStreamSourceObserver> source_observer_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); 77 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData);
78 }; 78 };
79 79
80 } // namespace content 80 } // namespace content
81 81
82 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ 82 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl_unittest.cc ('k') | content/renderer/media/media_stream_source_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698