Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: sky/engine/web/WebMediaPlayerClientImpl.cpp

Issue 689373003: Remove most of the media stack. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/web/WebMediaPlayerClientImpl.h ('k') | sky/engine/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebMediaPlayerClientImpl.cpp
diff --git a/sky/engine/web/WebMediaPlayerClientImpl.cpp b/sky/engine/web/WebMediaPlayerClientImpl.cpp
deleted file mode 100644
index ed19c6324f8d92c8c10652dc17d7cab91ba6afe8..0000000000000000000000000000000000000000
--- a/sky/engine/web/WebMediaPlayerClientImpl.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "web/WebMediaPlayerClientImpl.h"
-
-#include "core/frame/LocalFrame.h"
-#include "core/html/HTMLMediaElement.h"
-#include "core/html/TimeRanges.h"
-#include "core/rendering/RenderView.h"
-#include "core/rendering/compositing/RenderLayerCompositor.h"
-#include "platform/geometry/IntSize.h"
-#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/GraphicsLayer.h"
-#include "platform/graphics/gpu/Extensions3DUtil.h"
-#include "platform/graphics/media/MediaPlayer.h"
-#include "platform/graphics/skia/GaneshUtils.h"
-#include "public/platform/Platform.h"
-#include "public/platform/WebCString.h"
-#include "public/platform/WebCanvas.h"
-#include "public/platform/WebCompositorSupport.h"
-#include "public/platform/WebGraphicsContext3DProvider.h"
-#include "public/platform/WebMediaPlayer.h"
-#include "public/platform/WebRect.h"
-#include "public/platform/WebString.h"
-#include "public/platform/WebURL.h"
-#include "public/web/WebDocument.h"
-#include "public/web/WebFrameClient.h"
-#include "web/WebLocalFrameImpl.h"
-#include "web/WebViewImpl.h"
-
-#if OS(ANDROID)
-#include "GrContext.h"
-#include "GrTypes.h"
-#include "SkCanvas.h"
-#include "SkGrPixelRef.h"
-#endif
-
-
-#include "wtf/Assertions.h"
-#include "wtf/text/CString.h"
-
-namespace blink {
-
-static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const WebURL& url, LocalFrame* frame)
-{
- WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
-
- if (!webFrame || !webFrame->client())
- return nullptr;
- return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client));
-}
-
-WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const
-{
- return m_webMediaPlayer.get();
-}
-
-// WebMediaPlayerClient --------------------------------------------------------
-
-WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl()
-{
- // Explicitly destroy the WebMediaPlayer to allow verification of tear down.
- m_webMediaPlayer.clear();
-}
-
-void WebMediaPlayerClientImpl::networkStateChanged()
-{
- m_client->mediaPlayerNetworkStateChanged();
-}
-
-void WebMediaPlayerClientImpl::readyStateChanged()
-{
- m_client->mediaPlayerReadyStateChanged();
-}
-
-void WebMediaPlayerClientImpl::timeChanged()
-{
- m_client->mediaPlayerTimeChanged();
-}
-
-void WebMediaPlayerClientImpl::repaint()
-{
- m_client->mediaPlayerRepaint();
-}
-
-void WebMediaPlayerClientImpl::durationChanged()
-{
- m_client->mediaPlayerDurationChanged();
-}
-
-void WebMediaPlayerClientImpl::sizeChanged()
-{
- m_client->mediaPlayerSizeChanged();
-}
-
-void WebMediaPlayerClientImpl::playbackStateChanged()
-{
- m_client->mediaPlayerPlaybackStateChanged();
-}
-
-void WebMediaPlayerClientImpl::keyAdded(const WebString& keySystem, const WebString& sessionId)
-{
-}
-
-void WebMediaPlayerClientImpl::keyError(const WebString& keySystem, const WebString& sessionId, MediaKeyErrorCode errorCode, unsigned short systemCode)
-{
-}
-
-void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebString& sessionId, const unsigned char* message, unsigned messageLength, const WebURL& defaultURL)
-{
-}
-
-void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const unsigned char* initData, unsigned initDataLength)
-{
-}
-
-void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer)
-{
- m_client->mediaPlayerSetWebLayer(layer);
-}
-
-void WebMediaPlayerClientImpl::mediaSourceOpened(WebMediaSource* webMediaSource)
-{
- ASSERT(webMediaSource);
- m_client->mediaPlayerMediaSourceOpened(webMediaSource);
-}
-
-void WebMediaPlayerClientImpl::requestFullscreen()
-{
- m_client->mediaPlayerRequestFullscreen();
-}
-
-void WebMediaPlayerClientImpl::requestSeek(double time)
-{
- m_client->mediaPlayerRequestSeek(time);
-}
-
-// MediaPlayer -------------------------------------------------
-void WebMediaPlayerClientImpl::load(WebMediaPlayer::LoadType loadType, const WTF::String& url, WebMediaPlayer::CORSMode corsMode)
-{
- ASSERT(!m_webMediaPlayer);
-
- // FIXME: Remove this cast
- LocalFrame* frame = mediaElement().document().frame();
-
- WebURL poster = m_client->mediaPlayerPosterURL();
-
- KURL kurl(ParsedURLString, url);
- m_webMediaPlayer = createWebMediaPlayer(this, kurl, frame);
- if (!m_webMediaPlayer)
- return;
-
- m_webMediaPlayer->setVolume(mediaElement().effectiveMediaVolume());
-
- m_webMediaPlayer->setPoster(poster);
-
- // Tell WebMediaPlayer about any connected CDM (may be null).
- m_webMediaPlayer->load(loadType, kurl, corsMode);
-}
-
-void WebMediaPlayerClientImpl::setPreload(MediaPlayer::Preload preload)
-{
- if (m_webMediaPlayer)
- m_webMediaPlayer->setPreload(static_cast<WebMediaPlayer::Preload>(preload));
-}
-
-PassOwnPtr<MediaPlayer> WebMediaPlayerClientImpl::create(MediaPlayerClient* client)
-{
- return adoptPtr(new WebMediaPlayerClientImpl(client));
-}
-
-WebMediaPlayerClientImpl::WebMediaPlayerClientImpl(MediaPlayerClient* client)
- : m_client(client)
-{
- ASSERT(m_client);
-}
-
-HTMLMediaElement& WebMediaPlayerClientImpl::mediaElement() const
-{
- return *static_cast<HTMLMediaElement*>(m_client);
-}
-
-} // namespace blink
« no previous file with comments | « sky/engine/web/WebMediaPlayerClientImpl.h ('k') | sky/engine/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698