| OLD | NEW |
| 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 Loading... |
| 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, false, true); | 100 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ
e>(type), name, false, true); |
| 106 } | 101 } |
| 107 | 102 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); | 228 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); |
| 234 if (wrapper->consumer() == consumer) { | 229 if (wrapper->consumer() == consumer) { |
| 235 m_private->removeAudioConsumer(wrapper); | 230 m_private->removeAudioConsumer(wrapper); |
| 236 return true; | 231 return true; |
| 237 } | 232 } |
| 238 } | 233 } |
| 239 return false; | 234 return false; |
| 240 } | 235 } |
| 241 | 236 |
| 242 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |