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

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

Issue 8135017: Refactor downloads into a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed indentation of calls to DownloadServiceFactory. Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_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/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 12
13 class DownloadItem; 13 class DownloadItem;
14 class DownloadManager;
14 class FilePath; 15 class FilePath;
15 class TabContents; 16 class TabContents;
16 class SavePackage; 17 class SavePackage;
17 18
18 // Browser's download manager: manages all downloads and destination view. 19 // Browser's download manager: manages all downloads and destination view.
19 class DownloadManagerDelegate { 20 class DownloadManagerDelegate {
20 public: 21 public:
21 virtual ~DownloadManagerDelegate() {} 22 virtual ~DownloadManagerDelegate() {}
22 23
23 // Lets the delegate know that the download manager is shutting down. 24 // Lets the delegate know that the download manager is shutting down.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 99
99 // Asks the user for the path to save a page. The delegate calls 100 // Asks the user for the path to save a page. The delegate calls
100 // SavePackage::OnPathPicked to give the answer. 101 // SavePackage::OnPathPicked to give the answer.
101 virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package, 102 virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package,
102 const FilePath& suggested_path, 103 const FilePath& suggested_path,
103 bool can_save_as_complete) = 0; 104 bool can_save_as_complete) = 0;
104 105
105 // Informs the delegate that the progress of downloads has changed. 106 // Informs the delegate that the progress of downloads has changed.
106 virtual void DownloadProgressUpdated() = 0; 107 virtual void DownloadProgressUpdated() = 0;
107 108
109 // Tell the delegate what manager it's delegating for;
110 // only called by the DownloadManager.
111 virtual void SetDownloadManager(DownloadManager* manager) = 0;
jam 2011/10/10 18:19:33 this pattern of having the delegate be told by the
Randy Smith (Not in Mondays) 2011/10/11 18:24:43 Yeah. This is to make the test code simpler--it a
112
108 protected: 113 protected:
109 DownloadManagerDelegate() {} 114 DownloadManagerDelegate() {}
110 115
111 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate); 116 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate);
112 }; 117 };
113 118
114 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ 119 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698