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

Side by Side Diff: chrome/browser/download/chrome_download_manager_delegate.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: Add ability to send unserialized intent data from browser process. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public content::DownloadManagerDelegate, 44 public content::DownloadManagerDelegate,
45 public content::NotificationObserver { 45 public content::NotificationObserver {
46 public: 46 public:
47 explicit ChromeDownloadManagerDelegate(Profile* profile); 47 explicit ChromeDownloadManagerDelegate(Profile* profile);
48 48
49 void SetDownloadManager(content::DownloadManager* dm); 49 void SetDownloadManager(content::DownloadManager* dm);
50 50
51 // Returns true if the given item is for an extension download. 51 // Returns true if the given item is for an extension download.
52 static bool IsExtensionDownload(const content::DownloadItem* item); 52 static bool IsExtensionDownload(const content::DownloadItem* item);
53 53
54 // Returns true if the given item should be handled by web intents.
55 static bool ShouldWebIntentsHandle(const content::DownloadItem& item);
56
54 virtual void Shutdown() OVERRIDE; 57 virtual void Shutdown() OVERRIDE;
55 virtual content::DownloadId GetNextId() OVERRIDE; 58 virtual content::DownloadId GetNextId() OVERRIDE;
56 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; 59 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE;
57 virtual void ChooseDownloadPath(content::WebContents* web_contents, 60 virtual void ChooseDownloadPath(content::WebContents* web_contents,
58 const FilePath& suggested_path, 61 const FilePath& suggested_path,
59 int32 download_id) OVERRIDE; 62 int32 download_id) OVERRIDE;
60 virtual FilePath GetIntermediatePath(const FilePath& suggested_path) OVERRIDE; 63 virtual FilePath GetIntermediatePath(const FilePath& suggested_path) OVERRIDE;
61 virtual content::WebContents* 64 virtual content::WebContents*
62 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; 65 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE;
63 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; 66 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Maps from pending extension installations to DownloadItem IDs. 157 // Maps from pending extension installations to DownloadItem IDs.
155 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap; 158 typedef base::hash_map<CrxInstaller*, int> CrxInstallerMap;
156 CrxInstallerMap crx_installers_; 159 CrxInstallerMap crx_installers_;
157 160
158 content::NotificationRegistrar registrar_; 161 content::NotificationRegistrar registrar_;
159 162
160 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); 163 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate);
161 }; 164 };
162 165
163 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ 166 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698