summaryrefslogtreecommitdiffstats
path: root/webkit/api
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 03:23:46 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 03:23:46 +0000
commit574a1d691c71e833638ccb1ca395dfa20c6835a4 (patch)
tree1d5f63a520c6b87fd74a19d57e9eaf4737bdd4fc /webkit/api
parent91cea0e774541297a46197d87e486cf8a4199775 (diff)
downloadchromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.zip
chromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.tar.gz
chromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.tar.bz2
Begin implementation of the context menu for Video and Audio tags.
This code should enable the creation of a basic context menu for the Video and Audio tags. The actions for fullscreen, save screenshot, loop, and set playback rate are not yet implemented. BUG=15686 TEST=None Review URL: http://codereview.chromium.org/149604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api')
-rw-r--r--webkit/api/public/WebMediaPlayer.h2
-rw-r--r--webkit/api/src/WebMediaPlayerClientImpl.cpp14
-rw-r--r--webkit/api/src/WebMediaPlayerClientImpl.h2
3 files changed, 18 insertions, 0 deletions
diff --git a/webkit/api/public/WebMediaPlayer.h b/webkit/api/public/WebMediaPlayer.h
index 740b894..8b60c77 100644
--- a/webkit/api/public/WebMediaPlayer.h
+++ b/webkit/api/public/WebMediaPlayer.h
@@ -67,6 +67,8 @@ namespace WebKit {
// Playback controls.
virtual void play() = 0;
virtual void pause() = 0;
+ virtual bool supportsFullscreen() const = 0;
+ virtual bool supportsSave() const = 0;
virtual void seek(float seconds) = 0;
virtual void setEndTime(float seconds) = 0;
virtual void setRate(float) = 0;
diff --git a/webkit/api/src/WebMediaPlayerClientImpl.cpp b/webkit/api/src/WebMediaPlayerClientImpl.cpp
index ca666e9..0451ad8 100644
--- a/webkit/api/src/WebMediaPlayerClientImpl.cpp
+++ b/webkit/api/src/WebMediaPlayerClientImpl.cpp
@@ -201,6 +201,20 @@ bool WebMediaPlayerClientImpl::paused() const
return false;
}
+bool WebMediaPlayerClientImpl::supportsFullscreen() const
+{
+ if (m_webMediaPlayer.get())
+ return m_webMediaPlayer->supportsFullscreen();
+ return false;
+}
+
+bool WebMediaPlayerClientImpl::supportsSave() const
+{
+ if (m_webMediaPlayer.get())
+ return m_webMediaPlayer->supportsSave();
+ return false;
+}
+
void WebMediaPlayerClientImpl::setVolume(float volume)
{
if (m_webMediaPlayer.get())
diff --git a/webkit/api/src/WebMediaPlayerClientImpl.h b/webkit/api/src/WebMediaPlayerClientImpl.h
index 9f5cd5d..d758276 100644
--- a/webkit/api/src/WebMediaPlayerClientImpl.h
+++ b/webkit/api/src/WebMediaPlayerClientImpl.h
@@ -66,6 +66,8 @@ namespace WebKit {
virtual void cancelLoad();
virtual void play();
virtual void pause();
+ virtual bool supportsFullscreen() const;
+ virtual bool supportsSave() const;
virtual WebCore::IntSize naturalSize() const;
virtual bool hasVideo() const;
virtual void setVisible(bool);