• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #ifndef CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
6 #define CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
7 #pragma once
8 
9 #include "include/cef_download_item.h"
10 #include "libcef/common/value_base.h"
11 
12 namespace download {
13 class DownloadItem;
14 }
15 
16 // CefDownloadItem implementation
17 class CefDownloadItemImpl
18     : public CefValueBase<CefDownloadItem, download::DownloadItem> {
19  public:
20   explicit CefDownloadItemImpl(download::DownloadItem* value);
21 
22   CefDownloadItemImpl(const CefDownloadItemImpl&) = delete;
23   CefDownloadItemImpl& operator=(const CefDownloadItemImpl&) = delete;
24 
25   // CefDownloadItem methods.
26   bool IsValid() override;
27   bool IsInProgress() override;
28   bool IsComplete() override;
29   bool IsCanceled() override;
30   int64 GetCurrentSpeed() override;
31   int GetPercentComplete() override;
32   int64 GetTotalBytes() override;
33   int64 GetReceivedBytes() override;
34   CefTime GetStartTime() override;
35   CefTime GetEndTime() override;
36   CefString GetFullPath() override;
37   uint32 GetId() override;
38   CefString GetURL() override;
39   CefString GetOriginalUrl() override;
40   CefString GetSuggestedFileName() override;
41   CefString GetContentDisposition() override;
42   CefString GetMimeType() override;
43 };
44 
45 #endif  // CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
46