| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 m_private.reset(); | 88 m_private.reset(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 WebMediaStreamSource::operator MediaStreamSource*() const | 91 WebMediaStreamSource::operator MediaStreamSource*() const |
| 92 { | 92 { |
| 93 return m_private.get(); | 93 return m_private.get(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS
tring& name) | 96 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS
tring& name) |
| 97 { | 97 { |
| 98 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ
e>(type), name, false, true); | 98 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Str
eamType>(type), name, false, true); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS
tring& name, bool remote, bool readonly) | 101 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS
tring& name, bool remote, bool readonly) |
| 102 { | 102 { |
| 103 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ
e>(type), name, remote, readonly); | 103 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Str
eamType>(type), name, remote, readonly); |
| 104 } | 104 } |
| 105 | 105 |
| 106 WebString WebMediaStreamSource::id() const | 106 WebString WebMediaStreamSource::id() const |
| 107 { | 107 { |
| 108 ASSERT(!m_private.isNull()); | 108 ASSERT(!m_private.isNull()); |
| 109 return m_private.get()->id(); | 109 return m_private.get()->id(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 WebMediaStreamSource::Type WebMediaStreamSource::type() const | 112 WebMediaStreamSource::Type WebMediaStreamSource::type() const |
| 113 { | 113 { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 129 | 129 |
| 130 void WebMediaStreamSource::setReadyState(ReadyState state) | 130 void WebMediaStreamSource::setReadyState(ReadyState state) |
| 131 { | 131 { |
| 132 ASSERT(!m_private.isNull()); | 132 ASSERT(!m_private.isNull()); |
| 133 m_private->setReadyState(static_cast<MediaStreamSource::ReadyState>(state)); | 133 m_private->setReadyState(static_cast<MediaStreamSource::ReadyState>(state)); |
| 134 } | 134 } |
| 135 | 135 |
| 136 WebMediaStreamSource::ReadyState WebMediaStreamSource::readyState() const | 136 WebMediaStreamSource::ReadyState WebMediaStreamSource::readyState() const |
| 137 { | 137 { |
| 138 ASSERT(!m_private.isNull()); | 138 ASSERT(!m_private.isNull()); |
| 139 return static_cast<ReadyState>(m_private->readyState()); | 139 return static_cast<ReadyState>(m_private->getReadyState()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 WebMediaStreamSource::ExtraData* WebMediaStreamSource::extraData() const | 142 WebMediaStreamSource::ExtraData* WebMediaStreamSource::extraData() const |
| 143 { | 143 { |
| 144 ASSERT(!m_private.isNull()); | 144 ASSERT(!m_private.isNull()); |
| 145 MediaStreamSource::ExtraData* data = m_private->extraData(); | 145 MediaStreamSource::ExtraData* data = m_private->extraData(); |
| 146 if (!data) | 146 if (!data) |
| 147 return 0; | 147 return 0; |
| 148 return static_cast<ExtraDataContainer*>(data)->extraData(); | 148 return static_cast<ExtraDataContainer*>(data)->extraData(); |
| 149 } | 149 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); | 226 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); |
| 227 if (wrapper->consumer() == consumer) { | 227 if (wrapper->consumer() == consumer) { |
| 228 m_private->removeAudioConsumer(wrapper); | 228 m_private->removeAudioConsumer(wrapper); |
| 229 return true; | 229 return true; |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 return false; | 232 return false; |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace blink | 235 } // namespace blink |
| OLD | NEW |