| OLD | NEW |
| 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 | 5 |
| 6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/message_loop_helpers.h" | 17 #include "base/message_loop_helpers.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "content/browser/download/download_item_impl.h" | 20 #include "content/browser/download/download_item_impl.h" |
| 21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
| 22 #include "content/public/browser/download_manager.h" | 22 #include "content/public/browser/download_manager.h" |
| 23 | 23 |
| 24 class CONTENT_EXPORT DownloadManagerImpl | 24 class CONTENT_EXPORT DownloadManagerImpl |
| 25 : public content::DownloadManager, | 25 : public content::DownloadManager, |
| 26 public DownloadItemImpl::Delegate { | 26 public DownloadItemImpl::Delegate { |
| 27 public: | 27 public: |
| 28 DownloadManagerImpl(content::DownloadManagerDelegate* delegate, | 28 explicit DownloadManagerImpl(net::NetLog* net_log); |
| 29 net::NetLog* net_log); | |
| 30 | 29 |
| 31 // content::DownloadManager functions. | 30 // content::DownloadManager functions. |
| 31 virtual void SetDelegate(content::DownloadManagerDelegate* delegate) OVERRIDE; |
| 32 virtual void Shutdown() OVERRIDE; | 32 virtual void Shutdown() OVERRIDE; |
| 33 virtual void GetTemporaryDownloads(const FilePath& dir_path, | 33 virtual void GetTemporaryDownloads(const FilePath& dir_path, |
| 34 DownloadVector* result) OVERRIDE; | 34 DownloadVector* result) OVERRIDE; |
| 35 virtual void GetAllDownloads(const FilePath& dir_path, | 35 virtual void GetAllDownloads(const FilePath& dir_path, |
| 36 DownloadVector* result) OVERRIDE; | 36 DownloadVector* result) OVERRIDE; |
| 37 virtual void SearchDownloads(const string16& query, | 37 virtual void SearchDownloads(const string16& query, |
| 38 DownloadVector* result) OVERRIDE; | 38 DownloadVector* result) OVERRIDE; |
| 39 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; | 39 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; |
| 40 virtual void StartDownload(int32 id) OVERRIDE; | 40 virtual void StartDownload(int32 id) OVERRIDE; |
| 41 virtual void UpdateDownload(int32 download_id, | 41 virtual void UpdateDownload(int32 download_id, |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 // Allows an embedder to control behavior. Guaranteed to outlive this object. | 236 // Allows an embedder to control behavior. Guaranteed to outlive this object. |
| 237 content::DownloadManagerDelegate* delegate_; | 237 content::DownloadManagerDelegate* delegate_; |
| 238 | 238 |
| 239 net::NetLog* net_log_; | 239 net::NetLog* net_log_; |
| 240 | 240 |
| 241 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 241 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 244 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |