| OLD | NEW |
| 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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
| 6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
| 7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
| 8 // active profile in Chrome. | 8 // active profile in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // of downloads. | 79 // of downloads. |
| 80 virtual void ModelChanged() = 0; | 80 virtual void ModelChanged() = 0; |
| 81 | 81 |
| 82 // Called when the DownloadManager is being destroyed to prevent Observers | 82 // Called when the DownloadManager is being destroyed to prevent Observers |
| 83 // from calling back to a stale pointer. | 83 // from calling back to a stale pointer. |
| 84 virtual void ManagerGoingDown() {} | 84 virtual void ManagerGoingDown() {} |
| 85 | 85 |
| 86 // Called immediately after the DownloadManager puts up a select file | 86 // Called immediately after the DownloadManager puts up a select file |
| 87 // dialog. | 87 // dialog. |
| 88 // |id| indicates which download opened the dialog. | 88 // |id| indicates which download opened the dialog. |
| 89 virtual void SelectFileDialogDisplayed(int32 id) {} | 89 // |suggested_path| indicates the path suggested in the dialog. |
| 90 virtual void SelectFileDialogDisplayed( |
| 91 int32 id, const FilePath& suggested_path) {} |
| 90 | 92 |
| 91 protected: | 93 protected: |
| 92 virtual ~Observer() {} | 94 virtual ~Observer() {} |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 // Return all temporary downloads that reside in the specified directory. | 97 // Return all temporary downloads that reside in the specified directory. |
| 96 void GetTemporaryDownloads(const FilePath& dir_path, | 98 void GetTemporaryDownloads(const FilePath& dir_path, |
| 97 std::vector<DownloadItem*>* result); | 99 std::vector<DownloadItem*>* result); |
| 98 | 100 |
| 99 // Return all non-temporary downloads in the specified directory that are | 101 // Return all non-temporary downloads in the specified directory that are |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // The "Save As" dialog box used to ask the user where a file should be | 413 // The "Save As" dialog box used to ask the user where a file should be |
| 412 // saved. | 414 // saved. |
| 413 scoped_refptr<SelectFileDialog> select_file_dialog_; | 415 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 414 | 416 |
| 415 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; | 417 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; |
| 416 | 418 |
| 417 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 419 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 418 }; | 420 }; |
| 419 | 421 |
| 420 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 422 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |