diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 21:40:36 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 21:40:36 +0000 |
commit | ec9212f3e7399920c6c50b8943549b995192c5cf (patch) | |
tree | 2f0ebe96ba5c4ec29457ea4f68aa702dc7a99afa /webkit/tools | |
parent | f08f95e9d8e6f36be7162c77acefc834764209e1 (diff) | |
download | chromium_src-ec9212f3e7399920c6c50b8943549b995192c5cf.zip chromium_src-ec9212f3e7399920c6c50b8943549b995192c5cf.tar.gz chromium_src-ec9212f3e7399920c6c50b8943549b995192c5cf.tar.bz2 |
Bridge out media player from MediaPlayerPrivate.
- Remove MediaPlayerPrivateChromium.cpp and move it to webkit/glue/media_player_private_impl.cc
- Added the following classes:
WebMediaPlayer
WebMediaPlayerImpl
WebMediaPlayerDelegate
WebMediaPlayerDelegateImpl
TestWebMediaPlayerDelegate
VideoStackMediaPlayer (Just a forward declaration)
- One include fix for webkit/glue/webframe.h
- Overview of what each class is doing:
WebMediaPlayer and WebMediaPlayerImpl
Wrapper over the MediaPlayerPrivate, it provides methods like Repaint(), NotifyNetworkStateChange(), etc to VideoStackMediaPlayer. It also creates the ResourceHandle for VideoStackMediaPlayer for resource loading, or maybe VideoStackMediaPlayer can simply use webkit_glue::ResourceDispatcher?
WebMediaPlayerDelegate, WebMediaPlayerDelegateImpl
Delegate calls from webkit to the internal media player.
MediaPlayerPrivate
Forward calls to WebMidiaPlayerDelegate, creates WebMediaPlayerDelegate and WebMediaPlayer in the constructor. Expose some public methods to WebMediaPlayer so we can actually do repaint and notification of changes.
Review URL: http://codereview.chromium.org/13762
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_switches.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_switches.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 4d7404b..b62d62f 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -33,6 +33,7 @@ #include "webkit/glue/webwidget.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_navigation_controller.h" +#include "webkit/tools/test_shell/test_shell_switches.h" #if defined(OS_MACOSX) #include "webkit/glue/bogus_webkit_strings.h" @@ -442,6 +443,10 @@ void TestShell::SetFocus(WebWidgetHost* host, bool enable) { namespace webkit_glue { +bool IsMediaPlayerAvailable() { + return CommandLine().HasSwitch(test_shell::kEnableVideo); +} + void PrefetchDns(const std::string& hostname) {} void PrecacheUrl(const char16* url, int url_length) {} diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc index 214dd96..54e7af3 100644 --- a/webkit/tools/test_shell/test_shell_switches.cc +++ b/webkit/tools/test_shell/test_shell_switches.cc @@ -67,5 +67,8 @@ const wchar_t kAllowScriptsToCloseWindows[] = L"allow-scripts-to-close-windows"; extern const wchar_t kCheckLayoutTestSystemDeps[] = L"check-layout-test-sys-deps"; +// Enable the media player by having this switch. +extern const wchar_t kEnableVideo[] = L"enable-video"; + } // namespace test_shell diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h index 450c5ee..22bc982 100644 --- a/webkit/tools/test_shell/test_shell_switches.h +++ b/webkit/tools/test_shell/test_shell_switches.h @@ -29,6 +29,7 @@ extern const wchar_t kUseWinHttp[]; extern const wchar_t kEnableTracing[]; extern const wchar_t kAllowScriptsToCloseWindows[]; extern const wchar_t kCheckLayoutTestSystemDeps[]; +extern const wchar_t kEnableVideo[]; } // namespace test_shell |