#include "chrome/browser/task_manager/providers/web_contents/renderer_task.h"
#include <string>
#include <utility>
#include "base/functional/callback_helpers.h"
#include "base/i18n/rtl.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/favicon/favicon_utils.h"
#include "chrome/browser/process_resource_usage.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/task_manager/task_manager_observer.h"
#include "chrome/grit/generated_resources.h"
#include "components/sessions/content/session_tab_helper.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_delegate.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "ui/base/l10n/l10n_util.h"
namespace task_manager {
namespace {
ProcessResourceUsage* CreateRendererResourcesSampler(
content::RenderProcessHost* render_process_host) { … }
std::u16string GetRendererProfileName(
content::RenderProcessHost* render_process_host) { … }
bool IsRendererResourceSamplingDisabled(int64_t flags) { … }
}
RendererTask::RendererTask(const std::u16string& title,
const gfx::ImageSkia* icon,
content::WebContents* web_contents)
: … { … }
RendererTask::RendererTask(const std::u16string& title,
const gfx::ImageSkia* icon,
content::RenderFrameHost* subframe)
: … { … }
RendererTask::RendererTask(const std::u16string& title,
const gfx::ImageSkia* icon,
content::WebContents* web_contents,
content::RenderProcessHost* render_process_host)
: … { … }
RendererTask::~RendererTask() { … }
void RendererTask::Activate() { … }
void RendererTask::Refresh(const base::TimeDelta& update_interval,
int64_t refresh_flags) { … }
Task::Type RendererTask::GetType() const { … }
int RendererTask::GetChildProcessUniqueID() const { … }
void RendererTask::GetTerminationStatus(base::TerminationStatus* out_status,
int* out_error_code) const { … }
std::u16string RendererTask::GetProfileName() const { … }
SessionID RendererTask::GetTabId() const { … }
int64_t RendererTask::GetV8MemoryAllocated() const { … }
int64_t RendererTask::GetV8MemoryUsed() const { … }
bool RendererTask::ReportsWebCacheStats() const { … }
blink::WebCacheResourceTypeStats RendererTask::GetWebCacheStats() const { … }
void RendererTask::OnFaviconUpdated(favicon::FaviconDriver* favicon_driver,
NotificationIconType notification_icon_type,
const GURL& icon_url,
bool icon_url_changed,
const gfx::Image& image) { … }
base::WeakPtr<RendererTask> RendererTask::AsWeakPtr() { … }
std::u16string RendererTask::GetTitleFromWebContents(
content::WebContents* web_contents) { … }
const gfx::ImageSkia* RendererTask::GetFaviconFromWebContents(
content::WebContents* web_contents) { … }
const std::u16string RendererTask::PrefixRendererTitle(
const std::u16string& title,
bool is_app,
bool is_extension,
bool is_incognito,
bool is_background) { … }
}