| 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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
| 6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
| 7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
| 8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| 11 // DownloadItem::Observer: | 11 // DownloadItem::Observer: |
| 12 // - allows observers to receive notifications about one download from start | 12 // - allows observers to receive notifications about one download from start |
| 13 // to completion | 13 // to completion |
| 14 // Use AddObserver() / RemoveObserver() on the appropriate download object to | 14 // Use AddObserver() / RemoveObserver() on the appropriate download object to |
| 15 // receive state updates. | 15 // receive state updates. |
| 16 | 16 |
| 17 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 17 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| 18 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 18 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| 19 #pragma once | 19 #pragma once |
| 20 | 20 |
| 21 #include <string> | 21 #include <string> |
| 22 | 22 |
| 23 #include "base/basictypes.h" | 23 #include "base/basictypes.h" |
| 24 #include "base/file_path.h" | 24 #include "base/file_path.h" |
| 25 #include "base/observer_list.h" | 25 #include "base/observer_list.h" |
| 26 #include "base/time.h" | 26 #include "base/time.h" |
| 27 #include "base/timer.h" | 27 #include "base/timer.h" |
| 28 #include "chrome/browser/download/download_request_handle.h" | 28 #include "content/browser/download/download_request_handle.h" |
| 29 #include "chrome/browser/download/download_state_info.h" | 29 #include "content/browser/download/download_state_info.h" |
| 30 #include "content/common/notification_observer.h" | 30 #include "content/common/notification_observer.h" |
| 31 #include "content/common/notification_registrar.h" | 31 #include "content/common/notification_registrar.h" |
| 32 #include "googleurl/src/gurl.h" | 32 #include "googleurl/src/gurl.h" |
| 33 | 33 |
| 34 class CrxInstaller; | 34 class CrxInstaller; |
| 35 class DownloadFileManager; | 35 class DownloadFileManager; |
| 36 class DownloadManager; | 36 class DownloadManager; |
| 37 struct DownloadCreateInfo; | 37 struct DownloadCreateInfo; |
| 38 struct DownloadHistoryInfo; | 38 struct DownloadHistoryInfo; |
| 39 | 39 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Do we actual open downloads when requested? For testing purposes | 483 // Do we actual open downloads when requested? For testing purposes |
| 484 // only. | 484 // only. |
| 485 bool open_enabled_; | 485 bool open_enabled_; |
| 486 | 486 |
| 487 // DownloadItem observes CRX installs it initiates. | 487 // DownloadItem observes CRX installs it initiates. |
| 488 NotificationRegistrar registrar_; | 488 NotificationRegistrar registrar_; |
| 489 | 489 |
| 490 DISALLOW_COPY_AND_ASSIGN(DownloadItem); | 490 DISALLOW_COPY_AND_ASSIGN(DownloadItem); |
| 491 }; | 491 }; |
| 492 | 492 |
| 493 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 493 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| OLD | NEW |