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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 96233002: Add a PDF component extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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..d063333e39940b559f87fdd9e14e2c468f1f8de1 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,15 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
AddNetworkSpeechSynthesisExtension();
#endif
#endif // defined(GOOGLE_CHROME_BUILD)
+
+ 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")));
+ }
}
void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {

Powered by Google App Engine
This is Rietveld 408576698