diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 12:49:54 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 12:49:54 +0000 |
commit | dfba8766fbe2b0d0ac7e538f18aaf6b92aa68c1e (patch) | |
tree | d2cabf655ef897af93e6e3a06ed0a11a8af2a0f1 /chrome/browser/pdf_unsupported_feature.cc | |
parent | 34a50fd92a10f1f0b50d2b73edb228935ff824c8 (diff) | |
download | chromium_src-dfba8766fbe2b0d0ac7e538f18aaf6b92aa68c1e.zip chromium_src-dfba8766fbe2b0d0ac7e538f18aaf6b92aa68c1e.tar.gz chromium_src-dfba8766fbe2b0d0ac7e538f18aaf6b92aa68c1e.tar.bz2 |
Add PluginServiceFilter interface and ChromePluginServiceFilter.
This should get rid of all references to webkit::npapi::IsPluginEnabled in content/.
BUG=80794
TEST=none
Review URL: http://codereview.chromium.org/7387010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/pdf_unsupported_feature.cc')
-rw-r--r-- | chrome/browser/pdf_unsupported_feature.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/pdf_unsupported_feature.cc b/chrome/browser/pdf_unsupported_feature.cc index 3f5f6d0..1a91a39 100644 --- a/chrome/browser/pdf_unsupported_feature.cc +++ b/chrome/browser/pdf_unsupported_feature.cc @@ -9,6 +9,7 @@ #include "base/version.h" #include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/plugin_prefs.h" +#include "chrome/browser/chrome_plugin_service_filter.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/chrome_interstitial_page.h" @@ -140,19 +141,19 @@ void OpenUsingReader(TabContentsWrapper* tab, const WebPluginInfo& reader_plugin, InfoBarDelegate* old_delegate, InfoBarDelegate* new_delegate) { - PluginService::OverriddenPlugin plugin; - plugin.render_process_id = tab->render_view_host()->process()->id(); - plugin.render_view_id = tab->render_view_host()->routing_id(); - plugin.url = tab->tab_contents()->GetURL(); - plugin.plugin = reader_plugin; + WebPluginInfo plugin = reader_plugin; // The plugin is disabled, so enable it to get around the renderer check. // Also give it a new version so that the renderer doesn't show the blocked // plugin UI if it's vulnerable, since we already went through the // interstitial. - plugin.plugin.enabled = WebPluginInfo::USER_ENABLED; - plugin.plugin.version = ASCIIToUTF16("11.0.0.0"); - - PluginService::GetInstance()->OverridePluginForTab(plugin); + plugin.enabled = WebPluginInfo::USER_ENABLED; + plugin.version = ASCIIToUTF16("11.0.0.0"); + + ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( + tab->render_view_host()->process()->id(), + tab->render_view_host()->routing_id(), + tab->tab_contents()->GetURL(), + plugin); tab->render_view_host()->Send(new ViewMsg_ReloadFrame( tab->render_view_host()->routing_id())); @@ -386,8 +387,7 @@ void PDFHasUnsupportedFeature(TabContentsWrapper* tab) { PluginGroup* reader_group = NULL; std::vector<PluginGroup> plugin_groups; - PluginList::Singleton()->GetPluginGroups( - false, &plugin_groups); + PluginList::Singleton()->GetPluginGroups(false, &plugin_groups); for (size_t i = 0; i < plugin_groups.size(); ++i) { if (plugin_groups[i].GetGroupName() == reader_group_name) { reader_group = &plugin_groups[i]; |