Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 10993016: Override plug-ins by path instead of name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_plugin_service_filter.cc ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_tab_controller.cc
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index 736da9e293f5f4b356a6ffff805811047cc46442..e181a96c138e7e1f12173341849b5c990f1b3ecc 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -10,6 +10,7 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
+#include "base/path_service.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_plugin_service_filter.h"
@@ -27,6 +28,7 @@
#include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_controller.h"
@@ -55,11 +57,13 @@ namespace {
void EnableInternalPDFPluginForTab(TabContents* preview_tab) {
// Always enable the internal PDF plugin for the print preview page.
+ webkit::WebPluginInfo pdf_plugin;
+ PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_plugin.path);
+
ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
preview_tab->web_contents()->GetRenderProcessHost()->GetID(),
preview_tab->web_contents()->GetRenderViewHost()->GetRoutingID(),
- GURL(),
- ASCIIToUTF16(chrome::ChromeContentClient::kPDFPluginName));
+ GURL(), pdf_plugin);
}
// WebDialogDelegate that specifies what the print preview dialog
« no previous file with comments | « chrome/browser/chrome_plugin_service_filter.cc ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698