diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-10 23:50:47 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-10 23:50:47 +0000 |
commit | d960ba465f0513bf56d1e5317a9c7194da8306b5 (patch) | |
tree | fa3ca9156a8338511142e74728d6d95d085f2bd8 /webkit | |
parent | 88871375bfbae5ba4811866c2daccc78e282bbef (diff) | |
download | chromium_src-d960ba465f0513bf56d1e5317a9c7194da8306b5.zip chromium_src-d960ba465f0513bf56d1e5317a9c7194da8306b5.tar.gz chromium_src-d960ba465f0513bf56d1e5317a9c7194da8306b5.tar.bz2 |
This fixes http://code.google.com/p/chromium/issues/detail?id=2846, which is an issue with bloomberg.com not detecting the windows media player plugin. The site reads the list of plugins off the Navigator object and runs through the list of plugins comparing each with the desired plugin name (Windows Media). This fails in Chrome as the Activex shim is registered by default as the handler for media player, with the name as activex-shim.
The fix is to split up the Activex shim registration into two, one handling the application/x-oleobject|application/oleobject mime types, and the other handling the windows media player types.
R=jam
Bug=2846
Review URL: http://codereview.chromium.org/7234
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_lib.cc | 29 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 2 |
3 files changed, 29 insertions, 6 deletions
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index 9e1bb54..b435f3f 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -45,13 +45,26 @@ PluginLib* PluginLib::CreatePluginLib(const std::wstring& filename) { if (iter != loaded_libs_->end()) return iter->second; - static const InternalPluginInfo activex_shim_info = { + static const InternalPluginInfo activex_shim_info_generic = { {kActiveXShimFileName, L"ActiveX Plug-in", L"ActiveX Plug-in provides a shim to support ActiveX controls", L"1, 0, 0, 1", - L"application/x-oleobject|application/oleobject|" - L"application/x-ms-wmp|application/asx|video/x-ms-asf-plugin|" + L"application/x-oleobject|application/oleobject", + L"*|*", + L"" + }, + activex_shim::ActiveX_Shim_NP_GetEntryPoints, + activex_shim::ActiveX_Shim_NP_Initialize, + activex_shim::ActiveX_Shim_NP_Shutdown + }; + + static const InternalPluginInfo activex_shim_windows_media_player = { + {kActivexShimFileNameForMediaPlayer, + kActivexShimFileNameForMediaPlayer, + L"Windows Media Player", + L"1, 0, 0, 1", + L"application/x-ms-wmp|application/asx|video/x-ms-asf-plugin|" L"application/x-mplayer2|video/x-ms-asf|video/x-ms-wm|audio/x-ms-wma|" L"audio/x-ms-wax|video/x-ms-wmv|video/x-ms-wvx", L"*|*|*|*|*|*|asf,asx,*|wm,*|wma,*|wax,*|wmv,*|wvx,*", @@ -78,9 +91,13 @@ PluginLib* PluginLib::CreatePluginLib(const std::wstring& filename) { WebPluginInfo* info = NULL; const InternalPluginInfo* internal_plugin_info = NULL; - if (filename == activex_shim_info.version_info.file_name) { - info = CreateWebPluginInfo(activex_shim_info.version_info); - internal_plugin_info = &activex_shim_info; + if (filename == activex_shim_info_generic.version_info.file_name) { + info = CreateWebPluginInfo(activex_shim_info_generic.version_info); + internal_plugin_info = &activex_shim_info_generic; + } else if (filename == + activex_shim_windows_media_player.version_info.file_name) { + info = CreateWebPluginInfo(activex_shim_windows_media_player.version_info); + internal_plugin_info = &activex_shim_windows_media_player; } else if (filename == default_null_plugin_info.version_info.file_name) { info = CreateWebPluginInfo(default_null_plugin_info.version_info); internal_plugin_info = &default_null_plugin_info; diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index e10bfc7..e8e4ea7 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -217,6 +217,10 @@ void PluginList::LoadInternalPlugins() { scoped_refptr<PluginLib> new_plugin = PluginLib::CreatePluginLib( kActiveXShimFileName); plugins_.push_back(new_plugin); + + new_plugin = PluginLib::CreatePluginLib( + kActivexShimFileNameForMediaPlayer); + plugins_.push_back(new_plugin); } } diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 1eac95a..af8c5fc 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -27,6 +27,8 @@ namespace NPAPI #define kNoNativeActiveXShimSwitch L"no-activex" // Internal file name for activex shim, used as a unique identifier. #define kActiveXShimFileName L"activex-shim" +// Internal file name for windows media player. +#define kActivexShimFileNameForMediaPlayer L"windows media" #define kDefaultPluginDllName L"default_plugin" |