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

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: Tests + rebase 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);
Randy Smith (Not in Mondays) 2013/11/04 19:53:26 As gestured at in the high level comment, an alter
asanka 2013/11/04 21:20:11 It's a valid point. However, the deciding whether
Randy Smith (Not in Mondays) 2013/11/04 22:57:46 Yes, it does; I hadn't fully groked that we were c
+
+ // 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:

Powered by Google App Engine
This is Rietveld 408576698