Move download_item.h from content/public to components/download

https://chromium-review.googlesource.com/907687
This commit is contained in:
Aleksei Kuzmin 2018-04-10 17:29:26 +02:00 committed by Samuel Attard
parent a315d6330c
commit 4e580d5b39
9 changed files with 58 additions and 51 deletions

View file

@ -10,7 +10,7 @@
#include "atom/browser/api/trackable_object.h"
#include "base/files/file_path.h"
#include "content/public/browser/download_item.h"
#include "components/download/public/common/download_item.h"
#include "native_mate/handle.h"
#include "url/gurl.h"
@ -19,10 +19,10 @@ namespace atom {
namespace api {
class DownloadItem : public mate::TrackableObject<DownloadItem>,
public content::DownloadItem::Observer {
public download::DownloadItem::Observer {
public:
static mate::Handle<DownloadItem> Create(v8::Isolate* isolate,
content::DownloadItem* item);
download::DownloadItem* item);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
@ -40,7 +40,7 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
std::string GetContentDisposition() const;
const GURL& GetURL() const;
const std::vector<GURL>& GetURLChain() const;
content::DownloadItem::DownloadState GetState() const;
download::DownloadItem::DownloadState GetState() const;
bool IsDone() const;
void SetSavePath(const base::FilePath& path);
base::FilePath GetSavePath() const;
@ -49,16 +49,16 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
double GetStartTime() const;
protected:
DownloadItem(v8::Isolate* isolate, content::DownloadItem* download_item);
DownloadItem(v8::Isolate* isolate, download::DownloadItem* download_item);
~DownloadItem() override;
// Override content::DownloadItem::Observer methods
void OnDownloadUpdated(content::DownloadItem* download) override;
void OnDownloadDestroyed(content::DownloadItem* download) override;
// Override download::DownloadItem::Observer methods
void OnDownloadUpdated(download::DownloadItem* download) override;
void OnDownloadDestroyed(download::DownloadItem* download) override;
private:
base::FilePath save_path_;
content::DownloadItem* download_item_;
download::DownloadItem* download_item_;
DISALLOW_COPY_AND_ASSIGN(DownloadItem);
};