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

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

Issue 55063002: Prefer opening PDF downloads in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Destroy PluginService once we are done with our plugin tests. Created 7 years, 1 month 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_item_model.h
diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h
index 5a2c141ac5679a9574a37c83692566ff77391cff..05a1023f5c32b653a665c9e4e71539f078a632e1 100644
--- a/chrome/browser/download/download_item_model.h
+++ b/chrome/browser/download/download_item_model.h
@@ -126,6 +126,18 @@ class DownloadItemModel {
// Change what's returned by ShouldNotifyUI().
void SetShouldNotifyUI(bool should_notify);
+ // Returns |true| if opening in the browser is preferred for this download. If
+ // |false|, the download should be opened with the system default application.
+ bool ShouldPreferOpeningInBrowser() const;
+
+ // Change what's returned by ShouldPreferOpeningInBrowser to |preference|.
+ void SetShouldPreferOpeningInBrowser(bool preference);
+
+ // Open the download using the platform handler for the download. The behavior
+ // of this method will be different from DownloadItem::OpenDownload() if
+ // ShouldPreferOpeningInBrowser().
+ void OpenUsingPlatformHandler();
+
content::DownloadItem* download() { return download_; }
private:
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate_unittest.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698