summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-26 06:00:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-26 06:00:23 -0700
commit2402143eddeb5773bdf7e9c74fe7f4412692775b (patch)
treef05c8f661083229ce248c2cd7009d0bf1d52510d /WebCore/platform/graphics
parent6829e61782ddf72e8dae812e0e5a0b91614d257b (diff)
parent3c5348b2ac92d2472149fad08c81c09fa6f43824 (diff)
downloadexternal_webkit-2402143eddeb5773bdf7e9c74fe7f4412692775b.zip
external_webkit-2402143eddeb5773bdf7e9c74fe7f4412692775b.tar.gz
external_webkit-2402143eddeb5773bdf7e9c74fe7f4412692775b.tar.bz2
Merge change 5139
* changes: Implement fullscreen video. Currently only load() and play() are supported. The rest of the MediaPlayerPrivate functionality will be added in a later CL.
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r--WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp164
-rw-r--r--WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h11
2 files changed, 11 insertions, 164 deletions
diff --git a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp
deleted file mode 100644
index 75bb578..0000000
--- a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(VIDEO)
-
-#include "MediaPlayerPrivateAndroid.h"
-
-namespace WebCore {
-
-void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar)
-{
- registrar(create, getSupportedTypes, supportsType);
-}
-
-void MediaPlayerPrivate::load(const String& url)
-{
-}
-
-void MediaPlayerPrivate::cancelLoad()
-{
-}
-
-void MediaPlayerPrivate::play()
-{
-}
-
-void MediaPlayerPrivate::pause()
-{
-}
-
-IntSize MediaPlayerPrivate::naturalSize() const
-{
- return IntSize();
-}
-
-bool MediaPlayerPrivate::hasVideo() const
-{
- return false;
-}
-
-void MediaPlayerPrivate::setVisible(bool)
-{
-}
-
-float MediaPlayerPrivate::duration() const
-{
- return 0;
-}
-
-float MediaPlayerPrivate::currentTime() const
-{
- return 0;
-}
-
-void MediaPlayerPrivate::seek(float time)
-{
-}
-
-bool MediaPlayerPrivate::seeking() const
-{
- return false;
-}
-
-void MediaPlayerPrivate::setEndTime(float time)
-{
-}
-
-void MediaPlayerPrivate::setRate(float)
-{
-}
-
-bool MediaPlayerPrivate::paused() const
-{
- return false;
-}
-
-void MediaPlayerPrivate::setVolume(float)
-{
-}
-
-MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const
-{
- return MediaPlayer::Empty;
-}
-
-MediaPlayer::ReadyState MediaPlayerPrivate::readyState() const
-{
- return MediaPlayer::HaveNothing;
-}
-
-float MediaPlayerPrivate::maxTimeSeekable() const
-{
- return 0;
-}
-
-float MediaPlayerPrivate::maxTimeBuffered() const
-{
- return 0;
-}
-
-int MediaPlayerPrivate::dataRate() const
-{
- return 0;
-}
-
-unsigned MediaPlayerPrivate::totalBytes() const
-{
- return 0;
-}
-
-unsigned MediaPlayerPrivate::bytesLoaded() const
-{
- return 0;
-}
-
-void MediaPlayerPrivate::setSize(const IntSize&)
-{
-}
-
-void MediaPlayerPrivate::paint(GraphicsContext*, const IntRect&)
-{
-}
-
-MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player)
-{
- return new MediaPlayerPrivate();
-}
-
-void MediaPlayerPrivate::getSupportedTypes(HashSet<String>&)
-{
-}
-
-MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& type, const String& codecs)
-{
- return MediaPlayer::IsNotSupported;
-}
-
-}
-
-#endif // VIDEO
diff --git a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h
index 9324699..7dcb60d 100644
--- a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h
+++ b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h
@@ -34,6 +34,8 @@ namespace WebCore {
class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
public:
+ ~MediaPlayerPrivate();
+
static void registerMediaEngine(MediaEngineRegistrar);
virtual void load(const String& url);
@@ -77,9 +79,18 @@ public:
virtual void paint(GraphicsContext*, const IntRect&);
private:
+ // Android-specific methods and fields.
static MediaPlayerPrivateInterface* create(MediaPlayer* player);
static void getSupportedTypes(HashSet<String>&);
static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
+
+ MediaPlayerPrivate(MediaPlayer *);
+ void createJavaPlayerIfNeeded();
+
+ MediaPlayer* m_player;
+ String m_url;
+ struct JavaGlue;
+ JavaGlue* m_glue;
};
} // namespace WebCore