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

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

Issue 552653005: Oilpan: Move MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ASSERT(m_owner); 62 ASSERT(m_owner);
63 return WebMediaStreamSource(m_owner); 63 return WebMediaStreamSource(m_owner);
64 } 64 }
65 65
66 void WebMediaStreamSource::ExtraData::setOwner(MediaStreamSource* owner) 66 void WebMediaStreamSource::ExtraData::setOwner(MediaStreamSource* owner)
67 { 67 {
68 ASSERT(!m_owner); 68 ASSERT(!m_owner);
69 m_owner = owner; 69 m_owner = owner;
70 } 70 }
71 71
72 WebMediaStreamSource::WebMediaStreamSource(const PassRefPtr<MediaStreamSource>& mediaStreamSource) 72 WebMediaStreamSource::WebMediaStreamSource(MediaStreamSource* mediaStreamSource)
73 : m_private(mediaStreamSource) 73 : m_private(mediaStreamSource)
74 { 74 {
75 } 75 }
76 76
77 WebMediaStreamSource& WebMediaStreamSource::operator=(MediaStreamSource* mediaSt reamSource) 77 WebMediaStreamSource& WebMediaStreamSource::operator=(MediaStreamSource* mediaSt reamSource)
78 { 78 {
79 m_private = mediaStreamSource; 79 m_private = mediaStreamSource;
80 return *this; 80 return *this;
81 } 81 }
82 82
83 void WebMediaStreamSource::assign(const WebMediaStreamSource& other) 83 void WebMediaStreamSource::assign(const WebMediaStreamSource& other)
84 { 84 {
85 m_private = other.m_private; 85 m_private = other.m_private;
86 } 86 }
87 87
88 void WebMediaStreamSource::reset() 88 void WebMediaStreamSource::reset()
89 { 89 {
90 m_private.reset(); 90 m_private.reset();
91 } 91 }
92 92
93 WebMediaStreamSource::operator PassRefPtr<MediaStreamSource>() const
94 {
95 return m_private.get();
96 }
97
98 WebMediaStreamSource::operator MediaStreamSource*() const 93 WebMediaStreamSource::operator MediaStreamSource*() const
99 { 94 {
100 return m_private.get(); 95 return m_private.get();
101 } 96 }
102 97
103 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS tring& name) 98 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS tring& name)
104 { 99 {
105 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ e>(type), name); 100 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ e>(type), name);
106 } 101 }
107 102
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); 217 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get());
223 if (wrapper->consumer() == consumer) { 218 if (wrapper->consumer() == consumer) {
224 m_private->removeAudioConsumer(wrapper); 219 m_private->removeAudioConsumer(wrapper);
225 return true; 220 return true;
226 } 221 }
227 } 222 }
228 return false; 223 return false;
229 } 224 }
230 225
231 } // namespace blink 226 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/exported/WebMediaStream.cpp ('k') | Source/platform/exported/WebMediaStreamTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698