#include "chrome/browser/download/download_shelf.h"
#include <optional>
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "chrome/browser/download/download_core_service.h"
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/offline_item_model.h"
#include "chrome/browser/download/offline_item_model_manager.h"
#include "chrome/browser/download/offline_item_model_manager_factory.h"
#include "chrome/browser/download/offline_item_utils.h"
#include "chrome/browser/offline_items_collection/offline_content_aggregator_factory.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_key.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/download/download_started_animation.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "components/download/public/common/download_item.h"
#include "components/offline_items_collection/core/offline_content_aggregator.h"
#include "components/offline_items_collection/core/offline_item.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_contents.h"
#include "ui/gfx/animation/animation.h"
DownloadShelf::DownloadShelf(Browser* browser, Profile* profile)
: … { … }
DownloadShelf::~DownloadShelf() = default;
void DownloadShelf::AddDownload(DownloadUIModel::DownloadUIModelPtr model) { … }
void DownloadShelf::Open() { … }
void DownloadShelf::Close() { … }
void DownloadShelf::Hide() { … }
void DownloadShelf::Unhide() { … }
base::TimeDelta DownloadShelf::GetTransientDownloadShowDelay() const { … }
void DownloadShelf::ShowDownload(DownloadUIModel::DownloadUIModelPtr download) { … }
void DownloadShelf::ShowDownloadById(
const offline_items_collection::ContentId& id) { … }
void DownloadShelf::OnGetDownloadDoneForOfflineItem(
const std::optional<offline_items_collection::OfflineItem>& item) { … }