diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 19:13:17 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 19:13:17 +0000 |
commit | 521c0356810dac743b751c0f96bf605e6b41e880 (patch) | |
tree | 95298b17b38fc8e5fe743a6068342b9f45decca9 /webkit | |
parent | fb75acb6eb743447ec3b93df0e1ce232a14bcd0d (diff) | |
download | chromium_src-521c0356810dac743b751c0f96bf605e6b41e880.zip chromium_src-521c0356810dac743b751c0f96bf605e6b41e880.tar.gz chromium_src-521c0356810dac743b751c0f96bf605e6b41e880.tar.bz2 |
Media player availability now determined by SetMediaPlayerAvailable.
Instead of relying on the command line, RenderProcess will attempt to load and enable the media player if possible. This is the first in a few changes where I'll be adding in hooks to load media DLLs at runtime if present.
Review URL: http://codereview.chromium.org/20253
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webkit_glue.h | 4 | ||||
-rwxr-xr-x | webkit/tools/test_shell/test_shell.cc | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 3ef990c..44dc8a4 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -142,6 +142,10 @@ bool DecodeImage(const std::string& image_data, SkBitmap* image); //----------------------------------------------------------------------------- // Functions implemented by the embedder, called by WebKit: +// Set during RenderProcess::GlobalInit when --enable-video has been passed in +// and all media related libraries were successfully loaded. +void SetMediaPlayerAvailable(bool value); + // This function is called from WebCore::MediaPlayerPrivate, // Returns true if media player is available and can be created. bool IsMediaPlayerAvailable(); diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index e6455a8..aa9dca7 100755 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -541,8 +541,14 @@ void TestShell::SetFocus(WebWidgetHost* host, bool enable) { namespace webkit_glue { +static bool g_media_player_available = false; + +void SetMediaPlayerAvailable(bool value) { + g_media_player_available = value; +} + bool IsMediaPlayerAvailable() { - return CommandLine::ForCurrentProcess()->HasSwitch(test_shell::kEnableVideo); + return g_media_player_available; } void PrefetchDns(const std::string& hostname) {} |