summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-27 01:06:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-27 01:06:01 +0000
commitd7ce427395f3ea473c9eac56107832fa8093ce09 (patch)
treec0fde2a3b8ba57a7048e8565e5a3a4eb0aad11e6 /chrome/common
parent01109dcfb9dc87900f4227efe0dc81d0d382918a (diff)
downloadchromium_src-d7ce427395f3ea473c9eac56107832fa8093ce09.zip
chromium_src-d7ce427395f3ea473c9eac56107832fa8093ce09.tar.gz
chromium_src-d7ce427395f3ea473c9eac56107832fa8093ce09.tar.bz2
Use internal pdf plugin with --internal-pdf
Review URL: http://codereview.chromium.org/1462001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_paths.cc12
-rw-r--r--chrome/common/chrome_paths.h1
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
4 files changed, 17 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 8614d1b..8796843 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -221,6 +221,18 @@ bool PathProvider(int key, FilePath* result) {
if (!file_util::PathExists(cur))
return false;
break;
+ case chrome::FILE_PDF_PLUGIN:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+#if defined(OS_WIN)
+ cur = cur.Append(FILE_PATH_LITERAL("pdf.dll"));
+ if (!file_util::PathExists(cur))
+ return false;
+#else
+ // TODO: port
+ return false;
+#endif
+ break;
#if defined(OS_CHROMEOS)
case chrome::FILE_CHROMEOS_API:
if (!PathService::Get(base::DIR_MODULE, &cur))
diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h
index d6aed60..43bf351 100644
--- a/chrome/common/chrome_paths.h
+++ b/chrome/common/chrome_paths.h
@@ -40,6 +40,7 @@ enum {
// playback.
FILE_GEARS_PLUGIN, // Full path to the gears.dll plugin file.
FILE_FLASH_PLUGIN, // Full path to the internal Flash plugin file.
+ FILE_PDF_PLUGIN, // Full path to the internal PDF plugin file.
FILE_LIBAVCODEC, // Full path to libavcodec media decoding
// library.
FILE_LIBAVFORMAT, // Full path to libavformat media parsing
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 2b9b02e..fc177fe 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -421,6 +421,9 @@ const char kIncognito[] = "incognito";
// Runs the Native Client inside the renderer process.
const char kInternalNaCl[] = "internal-nacl";
+// Uses internal plugin for displaying PDFs.
+const char kInternalPDF[] = "internal-pdf";
+
// Runs a trusted Pepper plugin inside the renderer process.
const char kInternalPepper[] = "internal-pepper";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 84cbdff..3a57ad9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -127,6 +127,7 @@ extern const char kImportFromFile[];
extern const char kInProcessPlugins[];
extern const char kIncognito[];
extern const char kInternalNaCl[];
+extern const char kInternalPDF[];
extern const char kInternalPepper[];
extern const char kJavaScriptFlags[];
extern const char kLoadExtension[];