| 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 "WebDocument.h" | 8 #include "WebDocument.h" |
| 9 #include "WebFrameClient.h" | 9 #include "WebFrameClient.h" |
| 10 #include "WebFrameImpl.h" | 10 #include "WebLocalFrameImpl.h" |
| 11 #include "WebViewImpl.h" | 11 #include "WebViewImpl.h" |
| 12 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
| 13 #include "core/html/HTMLMediaElement.h" | 13 #include "core/html/HTMLMediaElement.h" |
| 14 #include "core/html/TimeRanges.h" | 14 #include "core/html/TimeRanges.h" |
| 15 #include "core/rendering/RenderView.h" | 15 #include "core/rendering/RenderView.h" |
| 16 #include "core/rendering/compositing/RenderLayerCompositor.h" | 16 #include "core/rendering/compositing/RenderLayerCompositor.h" |
| 17 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 17 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
| 18 #include "modules/encryptedmedia/MediaKeyNeededEvent.h" | 18 #include "modules/encryptedmedia/MediaKeyNeededEvent.h" |
| 19 #include "modules/mediastream/MediaStreamRegistry.h" | 19 #include "modules/mediastream/MediaStreamRegistry.h" |
| 20 #include "platform/audio/AudioBus.h" | 20 #include "platform/audio/AudioBus.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 #include "wtf/Assertions.h" | 48 #include "wtf/Assertions.h" |
| 49 #include "wtf/text/CString.h" | 49 #include "wtf/text/CString.h" |
| 50 | 50 |
| 51 using namespace WebCore; | 51 using namespace WebCore; |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* cli
ent, const WebURL& url, LocalFrame* frame) | 55 static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* cli
ent, const WebURL& url, LocalFrame* frame) |
| 56 { | 56 { |
| 57 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); | 57 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); |
| 58 | 58 |
| 59 if (!webFrame || !webFrame->client()) | 59 if (!webFrame || !webFrame->client()) |
| 60 return nullptr; | 60 return nullptr; |
| 61 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client)
); | 61 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client)
); |
| 62 } | 62 } |
| 63 | 63 |
| 64 WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const | 64 WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const |
| 65 { | 65 { |
| 66 return m_webMediaPlayer.get(); | 66 return m_webMediaPlayer.get(); |
| 67 } | 67 } |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) | 555 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel
s, float sampleRate) |
| 556 { | 556 { |
| 557 if (m_client) | 557 if (m_client) |
| 558 m_client->setFormat(numberOfChannels, sampleRate); | 558 m_client->setFormat(numberOfChannels, sampleRate); |
| 559 } | 559 } |
| 560 | 560 |
| 561 #endif | 561 #endif |
| 562 | 562 |
| 563 } // namespace blink | 563 } // namespace blink |
| OLD | NEW |