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

Side by Side Diff: content/public/browser/download_manager_delegate.h

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed signed/unsigned compare issue. Created 8 years 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
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 CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // 67 //
68 // The state of the |item| shouldn't be modified during the process of 68 // The state of the |item| shouldn't be modified during the process of
69 // filename determination save for external data (GetExternalData() / 69 // filename determination save for external data (GetExternalData() /
70 // SetExternalData()). 70 // SetExternalData()).
71 // 71 //
72 // If the download should be canceled, |callback| should be invoked with an 72 // If the download should be canceled, |callback| should be invoked with an
73 // empty |target_path| argument. 73 // empty |target_path| argument.
74 virtual bool DetermineDownloadTarget(DownloadItem* item, 74 virtual bool DetermineDownloadTarget(DownloadItem* item,
75 const DownloadTargetCallback& callback); 75 const DownloadTargetCallback& callback);
76 76
77 // Gets the intermediate file's length.
78 // |path| is the final name of the file, unless |temporary| is true, in which
79 // case |path| is the temporary file name.
80 virtual int64 GetIntermediateFileLength(const FilePath& path,
81 bool temporary);
82
77 // Called when the download system wants to alert a WebContents that a 83 // Called when the download system wants to alert a WebContents that a
78 // download has started, but the TabConetnts has gone away. This lets an 84 // download has started, but the TabConetnts has gone away. This lets an
79 // delegate return an alternative WebContents. The delegate can return NULL. 85 // delegate return an alternative WebContents. The delegate can return NULL.
80 virtual WebContents* GetAlternativeWebContentsToNotifyForDownload(); 86 virtual WebContents* GetAlternativeWebContentsToNotifyForDownload();
81 87
82 // Tests if a file type should be opened automatically. 88 // Tests if a file type should be opened automatically.
83 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path); 89 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path);
84 90
85 // Allows the delegate to delay completion of the download. This function 91 // Allows the delegate to delay completion of the download. This function
86 // will either return true (in which case the download may complete) 92 // will either return true (in which case the download may complete)
(...skipping 28 matching lines...) Expand all
115 const SavePackagePathPickedCallback& callback) { 121 const SavePackagePathPickedCallback& callback) {
116 } 122 }
117 123
118 protected: 124 protected:
119 virtual ~DownloadManagerDelegate(); 125 virtual ~DownloadManagerDelegate();
120 }; 126 };
121 127
122 } // namespace content 128 } // namespace content
123 129
124 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ 130 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/browser/download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698