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

Side by Side Diff: Source/platform/exported/WebMediaStream.cpp

Issue 534473002: Revert of Oilpan: Move MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ExtraDataContainer(PassOwnPtr<WebMediaStream::ExtraData> extraData) : m_extr aData(extraData) { } 46 ExtraDataContainer(PassOwnPtr<WebMediaStream::ExtraData> extraData) : m_extr aData(extraData) { }
47 47
48 WebMediaStream::ExtraData* extraData() { return m_extraData.get(); } 48 WebMediaStream::ExtraData* extraData() { return m_extraData.get(); }
49 49
50 private: 50 private:
51 OwnPtr<WebMediaStream::ExtraData> m_extraData; 51 OwnPtr<WebMediaStream::ExtraData> m_extraData;
52 }; 52 };
53 53
54 } // namespace 54 } // namespace
55 55
56 WebMediaStream::WebMediaStream(const PassRefPtr<MediaStreamDescriptor>& mediaStr eamDescriptor)
57 : m_private(mediaStreamDescriptor)
58 {
59 }
60
56 WebMediaStream::WebMediaStream(MediaStreamDescriptor* mediaStreamDescriptor) 61 WebMediaStream::WebMediaStream(MediaStreamDescriptor* mediaStreamDescriptor)
57 : m_private(mediaStreamDescriptor) 62 : m_private(mediaStreamDescriptor)
58 { 63 {
59 } 64 }
60 65
61 void WebMediaStream::reset() 66 void WebMediaStream::reset()
62 { 67 {
63 m_private.reset(); 68 m_private.reset();
64 } 69 }
65 70
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ASSERT(!isNull()); 109 ASSERT(!isNull());
105 m_private->addRemoteTrack(track); 110 m_private->addRemoteTrack(track);
106 } 111 }
107 112
108 void WebMediaStream::removeTrack(const WebMediaStreamTrack& track) 113 void WebMediaStream::removeTrack(const WebMediaStreamTrack& track)
109 { 114 {
110 ASSERT(!isNull()); 115 ASSERT(!isNull());
111 m_private->removeRemoteTrack(track); 116 m_private->removeRemoteTrack(track);
112 } 117 }
113 118
114 WebMediaStream& WebMediaStream::operator=(MediaStreamDescriptor* mediaStreamDesc riptor) 119 WebMediaStream& WebMediaStream::operator=(const PassRefPtr<MediaStreamDescriptor >& mediaStreamDescriptor)
115 { 120 {
116 m_private = mediaStreamDescriptor; 121 m_private = mediaStreamDescriptor;
117 return *this; 122 return *this;
118 } 123 }
119 124
125 WebMediaStream::operator PassRefPtr<MediaStreamDescriptor>() const
126 {
127 return m_private.get();
128 }
129
120 WebMediaStream::operator MediaStreamDescriptor*() const 130 WebMediaStream::operator MediaStreamDescriptor*() const
121 { 131 {
122 return m_private.get(); 132 return m_private.get();
123 } 133 }
124 134
125 void WebMediaStream::initialize(const WebVector<WebMediaStreamTrack>& audioTrack s, const WebVector<WebMediaStreamTrack>& videoTracks) 135 void WebMediaStream::initialize(const WebVector<WebMediaStreamTrack>& audioTrack s, const WebVector<WebMediaStreamTrack>& videoTracks)
126 { 136 {
127 initialize(createCanonicalUUIDString(), audioTracks, videoTracks); 137 initialize(createCanonicalUUIDString(), audioTracks, videoTracks);
128 } 138 }
129 139
(...skipping 10 matching lines...) Expand all
140 } 150 }
141 m_private = MediaStreamDescriptor::create(label, audio, video); 151 m_private = MediaStreamDescriptor::create(label, audio, video);
142 } 152 }
143 153
144 void WebMediaStream::assign(const WebMediaStream& other) 154 void WebMediaStream::assign(const WebMediaStream& other)
145 { 155 {
146 m_private = other.m_private; 156 m_private = other.m_private;
147 } 157 }
148 158
149 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp ('k') | Source/platform/exported/WebMediaStreamSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698