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

Unified Diff: content/browser/download/download_item_impl.h

Issue 9651020: Pass content-type resources to web intents. Goes through download, then invokes the p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move dispatch logic client-side. Created 8 years, 9 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: content/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index 0d52138aecf7c191cfed1b1176c98f985aa03976..a9e1afd757661a10b90a202450bcf3667367b730 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -46,6 +46,10 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem {
// Tests if a file type should be opened automatically.
virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) = 0;
+ // Allows the delegate to indicate whether the download item should be
+ // dispatched as a web intent.
+ virtual bool ShouldOpenWithWebIntent(DownloadItem* download) = 0;
+
// Allows the delegate to override the opening of a download. If it returns
// true then it's reponsible for opening the item.
virtual bool ShouldOpenDownload(DownloadItem* download) = 0;
@@ -245,6 +249,10 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem {
// otherwise updated from |full_path_|.)
void UpdateTarget();
+ // Dispatch the content of the downloaded resource as a web intent. This will
+ // trigger a call to the WebContentsDelegate of the initiating context.
+ void DispatchAsWebIntent();
+
// State information used by the download manager.
DownloadStateInfo state_info_;

Powered by Google App Engine
This is Rietveld 408576698