#include "chrome/browser/task_manager/providers/web_contents/web_contents_task_provider.h"
#include <memory>
#include "base/check.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "chrome/browser/task_manager/providers/web_contents/back_forward_cache_task.h"
#include "chrome/browser/task_manager/providers/web_contents/fenced_frame_task.h"
#include "chrome/browser/task_manager/providers/web_contents/prerender_task.h"
#include "chrome/browser/task_manager/providers/web_contents/subframe_task.h"
#include "chrome/browser/task_manager/providers/web_contents/web_contents_tags_manager.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
RenderFrameHost;
RenderProcessHost;
SiteInstance;
WebContents;
namespace task_manager {
class WebContentsTaskProvider::WebContentsEntry
: public content::WebContentsObserver { … };
WebContentsTaskProvider::WebContentsEntry::WebContentsEntry(
content::WebContents* web_contents,
WebContentsTaskProvider* provider)
: … { … }
WebContentsTaskProvider::WebContentsEntry::~WebContentsEntry() { … }
void WebContentsTaskProvider::WebContentsEntry::CreateAllTasks() { … }
void WebContentsTaskProvider::WebContentsEntry::ClearAllTasks(
bool notify_observer) { … }
RendererTask* WebContentsTaskProvider::WebContentsEntry::GetTaskForFrame(
RenderFrameHost* render_frame_host) const { … }
RenderFrameHost* WebContentsTaskProvider::WebContentsEntry::FindLocalRoot(
RenderFrameHost* render_frame_host) const { … }
void WebContentsTaskProvider::WebContentsEntry::RenderFrameDeleted(
RenderFrameHost* render_frame_host) { … }
void WebContentsTaskProvider::WebContentsEntry::RenderFrameHostChanged(
RenderFrameHost* old_host,
RenderFrameHost* new_host) { … }
void WebContentsTaskProvider::WebContentsEntry::RenderFrameHostStateChanged(
RenderFrameHost* render_frame_host,
RenderFrameHost::LifecycleState old_state,
RenderFrameHost::LifecycleState new_state) { … }
void WebContentsTaskProvider::WebContentsEntry::RenderFrameReady(
int render_process_id,
int render_frame_id) { … }
void WebContentsTaskProvider::WebContentsEntry::WebContentsDestroyed() { … }
void WebContentsTaskProvider::WebContentsEntry::OnRendererUnresponsive(
RenderProcessHost* render_process_host) { … }
void WebContentsTaskProvider::WebContentsEntry::DidFinishNavigation(
content::NavigationHandle* navigation_handle) { … }
void WebContentsTaskProvider::WebContentsEntry::TitleWasSet(
content::NavigationEntry* entry) { … }
void WebContentsTaskProvider::WebContentsEntry::CreateTaskForFrame(
RenderFrameHost* render_frame_host) { … }
void WebContentsTaskProvider::WebContentsEntry::ClearTaskForFrame(
RenderFrameHost* render_frame_host) { … }
void WebContentsTaskProvider::WebContentsEntry::ClearTasksForDescendantsOf(
RenderFrameHost* ancestor) { … }
WebContentsTaskProvider::WebContentsTaskProvider() = default;
WebContentsTaskProvider::~WebContentsTaskProvider() { … }
void WebContentsTaskProvider::OnWebContentsTagCreated(
const WebContentsTag* tag) { … }
void WebContentsTaskProvider::OnWebContentsTagRemoved(
const WebContentsTag* tag) { … }
Task* WebContentsTaskProvider::GetTaskOfUrlRequest(int child_id, int route_id) { … }
bool WebContentsTaskProvider::HasWebContents(
content::WebContents* web_contents) const { … }
Task* WebContentsTaskProvider::GetTaskOfFrame(content::RenderFrameHost* rfh) { … }
void WebContentsTaskProvider::StartUpdating() { … }
void WebContentsTaskProvider::StopUpdating() { … }
void WebContentsTaskProvider::DeleteEntry(content::WebContents* web_contents) { … }
}