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

Unified Diff: chrome/browser/download/download_prefs.h

Issue 324593004: Windows: Add an "Open in Adobe Reader" menu item for PDF files in the download shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leave content/ alone Created 6 years, 6 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
Index: chrome/browser/download/download_prefs.h
diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h
index eca19d3de68444633683b71de1584f86cd433dde..3b562bec470eee434a9fc104b266f9cae09543ab 100644
--- a/chrome/browser/download/download_prefs.h
+++ b/chrome/browser/download/download_prefs.h
@@ -33,6 +33,12 @@ class DownloadPrefs {
// Returns the default download directory.
static const base::FilePath& GetDefaultDownloadDirectory();
+#if defined(OS_WIN)
+ // Returns true if it is known that Adobe Reader is up to date as of the
+ // time of the most recent DownloadPrefs creation.
+ static bool IsAdobeReaderUpToDate();
+#endif
+
// Returns the default download directory for the current profile.
base::FilePath GetDefaultDownloadDirectoryForProfile() const;
@@ -73,6 +79,15 @@ class DownloadPrefs {
// Disables auto-open based on file extension.
void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name);
+#if defined(OS_WIN)
+ // Store the user preference to disk. If |should_open| is true, also disable
+ // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin.
+ void SetShouldOpenPdfInAdobeReader(bool should_open);
+
+ // Return whether the user prefers to open PDF downloads in Adobe Reader.
+ bool ShouldOpenPdfInAdobeReader() const;
+#endif
+
void ResetAutoOpen();
private:
@@ -94,6 +109,10 @@ class DownloadPrefs {
AutoOpenCompareFunctor> AutoOpenSet;
AutoOpenSet auto_open_;
+#if defined(OS_WIN)
+ bool should_open_pdf_in_adobe_reader_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(DownloadPrefs);
};

Powered by Google App Engine
This is Rietveld 408576698