chromium/chrome/browser/task_manager/providers/web_contents/web_contents_task_provider.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Defines an entry for each WebContents that will be tracked by the provider.
// The entry is used to observe certain events in its corresponding WebContents
// and then it notifies the provider or the render task (representing the
// WebContents) of these events.
// The entry owns the created tasks representing the WebContents, and it is
// itself owned by the provider.
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) {}

// Handles creation and deletion of BFCache tasks for pages entering and leaving
// the BFCache, and deletion of prerender tasks after prerendering activation.
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) {}

}  // namespace task_manager