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

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

Issue 9589003: Replace void* with int32 for passing download_id to SelectFileDialog::Listener. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser/unit tests 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 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 25 matching lines...) Expand all
36 // Notifies the delegate that a download is starting. The delegate can return 36 // Notifies the delegate that a download is starting. The delegate can return
37 // false to delay the start of the download, in which case it should call 37 // false to delay the start of the download, in which case it should call
38 // DownloadManager::RestartDownload when it's ready. 38 // DownloadManager::RestartDownload when it's ready.
39 virtual bool ShouldStartDownload(int32 download_id); 39 virtual bool ShouldStartDownload(int32 download_id);
40 40
41 // Asks the user for the path for a download. The delegate calls 41 // Asks the user for the path for a download. The delegate calls
42 // DownloadManager::FileSelected or DownloadManager::FileSelectionCanceled to 42 // DownloadManager::FileSelected or DownloadManager::FileSelectionCanceled to
43 // give the answer. 43 // give the answer.
44 virtual void ChooseDownloadPath(WebContents* web_contents, 44 virtual void ChooseDownloadPath(WebContents* web_contents,
45 const FilePath& suggested_path, 45 const FilePath& suggested_path,
46 void* data) {} 46 int32 download_id) {}
47 47
48 // Allows the embedder to set an intermediate name for the download until it's 48 // Allows the embedder to set an intermediate name for the download until it's
49 // complete. If the embedder doesn't want this return the suggested path. 49 // complete. If the embedder doesn't want this return the suggested path.
50 virtual FilePath GetIntermediatePath(const FilePath& suggested_path); 50 virtual FilePath GetIntermediatePath(const FilePath& suggested_path);
51 51
52 // Called when the download system wants to alert a WebContents that a 52 // Called when the download system wants to alert a WebContents that a
53 // download has started, but the TabConetnts has gone away. This lets an 53 // download has started, but the TabConetnts has gone away. This lets an
54 // delegate return an alternative WebContents. The delegate can return NULL. 54 // delegate return an alternative WebContents. The delegate can return NULL.
55 virtual WebContents* GetAlternativeWebContentsToNotifyForDownload(); 55 virtual WebContents* GetAlternativeWebContentsToNotifyForDownload();
56 56
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void ChooseSavePath(WebContents* web_contents, 113 virtual void ChooseSavePath(WebContents* web_contents,
114 const FilePath& suggested_path, 114 const FilePath& suggested_path,
115 const FilePath::StringType& default_extension, 115 const FilePath::StringType& default_extension,
116 bool can_save_as_complete, 116 bool can_save_as_complete,
117 SaveFilePathPickedCallback callback) {} 117 SaveFilePathPickedCallback callback) {}
118 }; 118 };
119 119
120 } // namespace content 120 } // namespace content
121 121
122 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ 122 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_manager.h ('k') | content/shell/shell_download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698