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

Unified Diff: chrome/browser/download/download_target_determiner_delegate.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_target_determiner_delegate.h
diff --git a/chrome/browser/download/download_target_determiner_delegate.h b/chrome/browser/download/download_target_determiner_delegate.h
index 68271ffc51a2d70e4a311162d2ad5ee736e9612a..f2aeec6f03625bf71cb9a3a1461f2bd68d700f88 100644
--- a/chrome/browser/download/download_target_determiner_delegate.h
+++ b/chrome/browser/download/download_target_determiner_delegate.h
@@ -62,6 +62,11 @@ class DownloadTargetDeterminerDelegate {
typedef base::Callback<void(content::DownloadDangerType danger_type)>
CheckDownloadUrlCallback;
+ // Callback to be invoked after GetFileMimeType() completes. The parameter
+ // should be the MIME type of the requested file. If no MIME type can be
+ // determined, it should be set to the empty string.
+ typedef base::Callback<void(const std::string&)> GetFileMimeTypeCallback;
+
// Notifies extensions of the impending filename determination. |virtual_path|
// is the current suggested virtual path. The |callback| should be invoked to
// indicate whether any extensions wish to override the path.
@@ -110,6 +115,9 @@ class DownloadTargetDeterminerDelegate {
const base::FilePath& virtual_path,
const CheckDownloadUrlCallback& callback) = 0;
+ // Get the MIME type for the given file.
+ virtual void GetFileMimeType(const base::FilePath& path,
+ const GetFileMimeTypeCallback& callback) = 0;
protected:
virtual ~DownloadTargetDeterminerDelegate();
};
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | chrome/browser/download/download_target_determiner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698