#include "components/dom_distiller/content/browser/distiller_page_web_contents.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/utf_string_conversions.h"
#include "components/dom_distiller/content/browser/distiller_javascript_utils.h"
#include "components/dom_distiller/core/distiller_page.h"
#include "components/dom_distiller/core/dom_distiller_constants.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "url/gurl.h"
namespace dom_distiller {
SourcePageHandleWebContents::SourcePageHandleWebContents(
content::WebContents* web_contents,
bool owned)
: … { … }
SourcePageHandleWebContents::~SourcePageHandleWebContents() { … }
std::unique_ptr<DistillerPage>
DistillerPageWebContentsFactory::CreateDistillerPage(
const gfx::Size& render_view_size) const { … }
std::unique_ptr<DistillerPage>
DistillerPageWebContentsFactory::CreateDistillerPageWithHandle(
std::unique_ptr<SourcePageHandle> handle) const { … }
DistillerPageWebContents::DistillerPageWebContents(
content::BrowserContext* browser_context,
const gfx::Size& render_view_size,
std::unique_ptr<SourcePageHandleWebContents> optional_web_contents_handle)
: … { … }
DistillerPageWebContents::~DistillerPageWebContents() = default;
bool DistillerPageWebContents::StringifyOutput() { … }
void DistillerPageWebContents::DistillPageImpl(const GURL& url,
const std::string& script) { … }
void DistillerPageWebContents::CreateNewWebContents(const GURL& url) { … }
gfx::Size DistillerPageWebContents::GetSizeForNewRenderView(
content::WebContents* web_contents) { … }
void DistillerPageWebContents::DOMContentLoaded(
content::RenderFrameHost* render_frame_host) { … }
void DistillerPageWebContents::DidFailLoad(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code) { … }
void DistillerPageWebContents::ExecuteJavaScript() { … }
void DistillerPageWebContents::OnWebContentsDistillationDone(
const GURL& page_url,
const base::TimeTicks& javascript_start,
base::Value value) { … }
content::RenderFrameHost& DistillerPageWebContents::TargetRenderFrameHost() { … }
}