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 /chrome/renderer/renderer_glue.cc | |
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 'chrome/renderer/renderer_glue.cc')
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 67dc679..fa2a87a 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -12,7 +12,6 @@ #endif #include "base/clipboard.h" -#include "base/command_line.h" #include "base/scoped_clipboard_writer.h" #include "base/string_util.h" #include "chrome/renderer/net/render_dns_master.h" @@ -144,8 +143,16 @@ ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() { namespace webkit_glue { +// Global variable set during RenderProcess::GlobalInit if video was enabled +// and our media libraries were successfully loaded. +static bool g_media_player_available = false; + +void SetMediaPlayerAvailable(bool value) { + g_media_player_available = value; +} + bool IsMediaPlayerAvailable() { - return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableVideo); + return g_media_player_available; } void PrefetchDns(const std::string& hostname) { |