Index: chrome/browser/extensions/component_loader.cc |
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc |
index 4d065c3104e4b9b40a2724b7647ff2b034ba61a8..f56a791d341bbf617271df0b609d3d2e734f5ea5 100644 |
--- a/chrome/browser/extensions/component_loader.cc |
+++ b/chrome/browser/extensions/component_loader.cc |
@@ -23,6 +23,7 @@ |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
+#include "content/public/browser/plugin_service.h" |
#include "extensions/common/extension.h" |
#include "extensions/common/id_util.h" |
#include "extensions/common/manifest_constants.h" |
@@ -560,6 +561,17 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages( |
AddNetworkSpeechSynthesisExtension(); |
#endif |
#endif // defined(GOOGLE_CHROME_BUILD) |
+ |
+#if defined(ENABLE_PLUGINS) |
+ base::FilePath pdf_path; |
+ content::PluginService* plugin_service = |
+ content::PluginService::GetInstance(); |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOutOfProcessPdf) && |
+ PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path) && |
+ plugin_service->GetRegisteredPpapiPluginInfo(pdf_path)) { |
+ Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf"))); |
+ } |
+#endif |
} |
void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |