#include "components/dom_distiller/core/dom_distiller_service.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/ranges/algorithm.h"
#include "base/task/single_thread_task_runner.h"
#include "base/uuid.h"
#include "components/dom_distiller/core/distilled_content_store.h"
#include "components/dom_distiller/core/proto/distilled_article.pb.h"
#include "components/dom_distiller/core/task_tracker.h"
#include "url/gurl.h"
namespace dom_distiller {
namespace {
ArticleEntry CreateSkeletonEntryForUrl(const GURL& url) { … }
}
DomDistillerService::DomDistillerService(
std::unique_ptr<DistillerFactory> distiller_factory,
std::unique_ptr<DistillerPageFactory> distiller_page_factory,
std::unique_ptr<DistilledPagePrefs> distilled_page_prefs,
std::unique_ptr<DistillerUIHandle> distiller_ui_handle)
: … { … }
DomDistillerService::~DomDistillerService() { … }
std::unique_ptr<DistillerPage> DomDistillerService::CreateDefaultDistillerPage(
const gfx::Size& render_view_size) { … }
std::unique_ptr<DistillerPage>
DomDistillerService::CreateDefaultDistillerPageWithHandle(
std::unique_ptr<SourcePageHandle> handle) { … }
std::unique_ptr<ViewerHandle> DomDistillerService::ViewUrl(
ViewRequestDelegate* delegate,
std::unique_ptr<DistillerPage> distiller_page,
const GURL& url) { … }
bool DomDistillerService::GetOrCreateTaskTrackerForUrl(
const GURL& url,
TaskTracker** task_tracker) { … }
TaskTracker* DomDistillerService::GetTaskTrackerForUrl(const GURL& url) const { … }
TaskTracker* DomDistillerService::CreateTaskTracker(const ArticleEntry& entry) { … }
void DomDistillerService::CancelTask(TaskTracker* task) { … }
DistilledPagePrefs* DomDistillerService::GetDistilledPagePrefs() { … }
DistillerUIHandle* DomDistillerService::GetDistillerUIHandle() { … }
base::WeakPtr<DomDistillerService> DomDistillerService::GetWeakPtr() { … }
bool DomDistillerService::HasTaskTrackerForTesting(const GURL& url) const { … }
}