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

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

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 years, 5 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 18 matching lines...) Expand all
29 // in response to this operation, the SavePackageDownloadCreatedCallback will be 29 // in response to this operation, the SavePackageDownloadCreatedCallback will be
30 // non-null. 30 // non-null.
31 typedef base::Callback<void(const FilePath&, 31 typedef base::Callback<void(const FilePath&,
32 content::SavePageType, 32 content::SavePageType,
33 const SavePackageDownloadCreatedCallback&)> 33 const SavePackageDownloadCreatedCallback&)>
34 SavePackagePathPickedCallback; 34 SavePackagePathPickedCallback;
35 35
36 // Browser's download manager: manages all downloads and destination view. 36 // Browser's download manager: manages all downloads and destination view.
37 class CONTENT_EXPORT DownloadManagerDelegate { 37 class CONTENT_EXPORT DownloadManagerDelegate {
38 public: 38 public:
39 virtual ~DownloadManagerDelegate();
40
41 // Lets the delegate know that the download manager is shutting down. 39 // Lets the delegate know that the download manager is shutting down.
42 virtual void Shutdown() {} 40 virtual void Shutdown() {}
43 41
44 // Returns a new DownloadId. 42 // Returns a new DownloadId.
45 virtual DownloadId GetNextId(); 43 virtual DownloadId GetNextId();
46 44
47 // Notifies the delegate that a download is starting. The delegate can return 45 // Notifies the delegate that a download is starting. The delegate can return
48 // false to delay the start of the download, in which case it should call 46 // false to delay the start of the download, in which case it should call
49 // DownloadManager::RestartDownload when it's ready. 47 // DownloadManager::RestartDownload when it's ready.
50 virtual bool ShouldStartDownload(int32 download_id); 48 virtual bool ShouldStartDownload(int32 download_id);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool* skip_dir_check) {} 124 bool* skip_dir_check) {}
127 125
128 // Asks the user for the path to save a page. The delegate calls the callback 126 // Asks the user for the path to save a page. The delegate calls the callback
129 // to give the answer. 127 // to give the answer.
130 virtual void ChooseSavePath(WebContents* web_contents, 128 virtual void ChooseSavePath(WebContents* web_contents,
131 const FilePath& suggested_path, 129 const FilePath& suggested_path,
132 const FilePath::StringType& default_extension, 130 const FilePath::StringType& default_extension,
133 bool can_save_as_complete, 131 bool can_save_as_complete,
134 const SavePackagePathPickedCallback& callback) { 132 const SavePackagePathPickedCallback& callback) {
135 } 133 }
134
135 protected:
136 virtual ~DownloadManagerDelegate();
136 }; 137 };
137 138
138 } // namespace content 139 } // namespace content
139 140
140 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ 141 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | content/public/browser/download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698