OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "config.h" | 5 #include "config.h" |
6 #include "WebMediaPlayerClientImpl.h" | 6 #include "WebMediaPlayerClientImpl.h" |
7 | 7 |
8 #include "InbandTextTrackPrivateImpl.h" | 8 #include "InbandTextTrackPrivateImpl.h" |
9 #include "MediaSourcePrivateImpl.h" | 9 #include "MediaSourcePrivateImpl.h" |
10 #include "WebAudioSourceProvider.h" | 10 #include "WebAudioSourceProvider.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 return 0; | 169 return 0; |
170 } | 170 } |
171 | 171 |
172 return plugin; | 172 return plugin; |
173 } | 173 } |
174 | 174 |
175 | 175 |
176 // FIXME: Remove this override and cast when Chromium is updated to use closeHel
perPluginSoon(). | 176 // FIXME: Remove this override and cast when Chromium is updated to use closeHel
perPluginSoon(). |
177 void WebMediaPlayerClientImpl::closeHelperPlugin() | 177 void WebMediaPlayerClientImpl::closeHelperPlugin() |
178 { | 178 { |
179 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document()->frame()
; | 179 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document().frame(); |
180 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); | 180 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); |
181 closeHelperPluginSoon(webFrame); | 181 closeHelperPluginSoon(webFrame); |
182 } | 182 } |
183 | 183 |
184 void WebMediaPlayerClientImpl::closeHelperPluginSoon(WebFrame* frame) | 184 void WebMediaPlayerClientImpl::closeHelperPluginSoon(WebFrame* frame) |
185 { | 185 { |
186 ASSERT(m_helperPlugin); | 186 ASSERT(m_helperPlugin); |
187 toWebViewImpl(frame->view())->closeHelperPluginSoon(m_helperPlugin.release()
); | 187 toWebViewImpl(frame->view())->closeHelperPluginSoon(m_helperPlugin.release()
); |
188 } | 188 } |
189 | 189 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 void WebMediaPlayerClientImpl::loadInternal() | 260 void WebMediaPlayerClientImpl::loadInternal() |
261 { | 261 { |
262 m_isMediaStream = WebCore::MediaStreamRegistry::registry().lookupMediaStream
Descriptor(m_url.string()); | 262 m_isMediaStream = WebCore::MediaStreamRegistry::registry().lookupMediaStream
Descriptor(m_url.string()); |
263 | 263 |
264 #if ENABLE(WEB_AUDIO) | 264 #if ENABLE(WEB_AUDIO) |
265 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's
WebAudioSourceProvider. | 265 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's
WebAudioSourceProvider. |
266 #endif | 266 #endif |
267 | 267 |
268 // FIXME: Remove this cast | 268 // FIXME: Remove this cast |
269 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document()->frame()
; | 269 Frame* frame = static_cast<HTMLMediaElement*>(m_client)->document().frame(); |
270 | 270 |
271 // This does not actually check whether the hardware can support accelerated | 271 // This does not actually check whether the hardware can support accelerated |
272 // compositing, but only if the flag is set. However, this is checked lazily | 272 // compositing, but only if the flag is set. However, this is checked lazily |
273 // in WebViewImpl::setIsAcceleratedCompositingActive() and will fail there | 273 // in WebViewImpl::setIsAcceleratedCompositingActive() and will fail there |
274 // if necessary. | 274 // if necessary. |
275 m_needsWebLayerForVideo = frame->contentRenderer()->compositor()->hasAcceler
atedCompositing(); | 275 m_needsWebLayerForVideo = frame->contentRenderer()->compositor()->hasAcceler
atedCompositing(); |
276 | 276 |
277 m_webMediaPlayer = createWebMediaPlayer(this, m_url, frame); | 277 m_webMediaPlayer = createWebMediaPlayer(this, m_url, frame); |
278 if (m_webMediaPlayer) { | 278 if (m_webMediaPlayer) { |
279 #if ENABLE(WEB_AUDIO) | 279 #if ENABLE(WEB_AUDIO) |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 753 |
754 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) | 754 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) |
755 { | 755 { |
756 if (m_client) | 756 if (m_client) |
757 m_client->setFormat(numberOfChannels, sampleRate); | 757 m_client->setFormat(numberOfChannels, sampleRate); |
758 } | 758 } |
759 | 759 |
760 #endif | 760 #endif |
761 | 761 |
762 } // namespace WebKit | 762 } // namespace WebKit |
OLD | NEW |