| 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 #if ENABLE(VIDEO) | 8 #if ENABLE(VIDEO) |
| 9 | 9 |
| 10 #include "AudioBus.h" | 10 #include "AudioBus.h" |
| 11 #include "AudioSourceProvider.h" | 11 #include "AudioSourceProvider.h" |
| 12 #include "AudioSourceProviderClient.h" | 12 #include "AudioSourceProviderClient.h" |
| 13 #include "Frame.h" | 13 #include "Frame.h" |
| 14 #include "GraphicsContext.h" | 14 #include "GraphicsContext.h" |
| 15 #include "GraphicsLayerChromium.h" | 15 #include "GraphicsLayerChromium.h" |
| 16 #include "HTMLMediaElement.h" | 16 #include "HTMLMediaElement.h" |
| 17 #include "IntSize.h" | 17 #include "IntSize.h" |
| 18 #include "KURL.h" | 18 #include "KURL.h" |
| 19 #include "MediaPlayer.h" | 19 #include "MediaPlayer.h" |
| 20 #include "NotImplemented.h" | 20 #include "NotImplemented.h" |
| 21 #include "PlatformContextSkia.h" | 21 #include "PlatformContextSkia.h" |
| 22 #include "RenderView.h" | 22 #include "RenderView.h" |
| 23 #include "TimeRanges.h" | 23 #include "TimeRanges.h" |
| 24 #include "WebAudioSourceProvider.h" | 24 #include "WebAudioSourceProvider.h" |
| 25 #include "WebDocument.h" |
| 25 #include "WebFrameClient.h" | 26 #include "WebFrameClient.h" |
| 26 #include "WebFrameImpl.h" | 27 #include "WebFrameImpl.h" |
| 27 #include "WebHelperPluginImpl.h" | 28 #include "WebHelperPluginImpl.h" |
| 28 #include "WebMediaPlayer.h" | 29 #include "WebMediaPlayer.h" |
| 29 #include "WebViewImpl.h" | 30 #include "WebViewImpl.h" |
| 30 #include <public/Platform.h> | 31 #include <public/Platform.h> |
| 31 #include <public/WebCString.h> | 32 #include <public/WebCString.h> |
| 32 #include <public/WebCanvas.h> | 33 #include <public/WebCanvas.h> |
| 33 #include <public/WebCompositorSupport.h> | 34 #include <public/WebCompositorSupport.h> |
| 34 #include <public/WebMimeRegistry.h> | 35 #include <public/WebMimeRegistry.h> |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 UNUSED_PARAM(keySystem); | 284 UNUSED_PARAM(keySystem); |
| 284 UNUSED_PARAM(sessionId); | 285 UNUSED_PARAM(sessionId); |
| 285 UNUSED_PARAM(initData); | 286 UNUSED_PARAM(initData); |
| 286 UNUSED_PARAM(initDataLength); | 287 UNUSED_PARAM(initDataLength); |
| 287 #endif | 288 #endif |
| 288 } | 289 } |
| 289 | 290 |
| 290 WebPlugin* WebMediaPlayerClientImpl::createHelperPlugin(const WebString& pluginT
ype, WebFrame* frame) | 291 WebPlugin* WebMediaPlayerClientImpl::createHelperPlugin(const WebString& pluginT
ype, WebFrame* frame) |
| 291 { | 292 { |
| 292 ASSERT(!m_helperPlugin); | 293 ASSERT(!m_helperPlugin); |
| 294 |
| 293 WebViewImpl* webView = static_cast<WebViewImpl*>(frame->view()); | 295 WebViewImpl* webView = static_cast<WebViewImpl*>(frame->view()); |
| 294 m_helperPlugin = webView->createHelperPlugin(pluginType); | 296 m_helperPlugin = webView->createHelperPlugin(pluginType, frame->document()); |
| 295 if (!m_helperPlugin) | 297 if (!m_helperPlugin) |
| 296 return 0; | 298 return 0; |
| 297 | 299 |
| 298 WebPlugin* plugin = m_helperPlugin->getPlugin(); | 300 WebPlugin* plugin = m_helperPlugin->getPlugin(); |
| 299 if (!plugin) { | 301 if (!plugin) { |
| 300 // There is no need to keep the helper plugin around and the caller | 302 // There is no need to keep the helper plugin around and the caller |
| 301 // should not be expected to call close after a failure (null pointer). | 303 // should not be expected to call close after a failure (null pointer). |
| 302 closeHelperPlugin(); | 304 closeHelperPlugin(); |
| 303 return 0; | 305 return 0; |
| 304 } | 306 } |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 { | 944 { |
| 943 if (m_client) | 945 if (m_client) |
| 944 m_client->setFormat(numberOfChannels, sampleRate); | 946 m_client->setFormat(numberOfChannels, sampleRate); |
| 945 } | 947 } |
| 946 | 948 |
| 947 #endif | 949 #endif |
| 948 | 950 |
| 949 } // namespace WebKit | 951 } // namespace WebKit |
| 950 | 952 |
| 951 #endif // ENABLE(VIDEO) | 953 #endif // ENABLE(VIDEO) |
| OLD | NEW |