#include "components/performance_manager/performance_manager_registry_impl.h"
#include <iterator>
#include <utility>
#include "base/not_fatal_until.h"
#include "base/observer_list.h"
#include "base/task/sequenced_task_runner.h"
#include "components/performance_manager/embedder/binders.h"
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/graph/worker_node_impl.h"
#include "components/performance_manager/performance_manager_tab_helper.h"
#include "components/performance_manager/public/mojom/coordination_unit.mojom.h"
#include "components/performance_manager/public/performance_manager.h"
#include "components/performance_manager/public/performance_manager_main_thread_mechanism.h"
#include "components/performance_manager/public/performance_manager_main_thread_observer.h"
#include "components/performance_manager/public/performance_manager_owned.h"
#include "components/performance_manager/render_process_user_data.h"
#include "components/performance_manager/service_worker_context_adapter.h"
#include "components/performance_manager/worker_watcher.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
namespace performance_manager {
namespace {
PerformanceManagerRegistryImpl* g_instance = …;
}
PerformanceManagerRegistryImpl::PerformanceManagerRegistryImpl() { … }
PerformanceManagerRegistryImpl::~PerformanceManagerRegistryImpl() { … }
PerformanceManagerRegistryImpl* PerformanceManagerRegistryImpl::GetInstance() { … }
void PerformanceManagerRegistryImpl::AddObserver(
PerformanceManagerMainThreadObserver* observer) { … }
void PerformanceManagerRegistryImpl::RemoveObserver(
PerformanceManagerMainThreadObserver* observer) { … }
void PerformanceManagerRegistryImpl::AddMechanism(
PerformanceManagerMainThreadMechanism* mechanism) { … }
void PerformanceManagerRegistryImpl::RemoveMechanism(
PerformanceManagerMainThreadMechanism* mechanism) { … }
bool PerformanceManagerRegistryImpl::HasMechanism(
PerformanceManagerMainThreadMechanism* mechanism) { … }
void PerformanceManagerRegistryImpl::PassToPM(
std::unique_ptr<PerformanceManagerOwned> pm_owned) { … }
std::unique_ptr<PerformanceManagerOwned>
PerformanceManagerRegistryImpl::TakeFromPM(PerformanceManagerOwned* pm_owned) { … }
void PerformanceManagerRegistryImpl::RegisterObject(
PerformanceManagerRegistered* pm_object) { … }
void PerformanceManagerRegistryImpl::UnregisterObject(
PerformanceManagerRegistered* pm_object) { … }
PerformanceManagerRegistered*
PerformanceManagerRegistryImpl::GetRegisteredObject(uintptr_t type_id) { … }
void PerformanceManagerRegistryImpl::CreatePageNodeForWebContents(
content::WebContents* web_contents) { … }
void PerformanceManagerRegistryImpl::SetPageType(
content::WebContents* web_contents,
PageType type) { … }
PerformanceManagerRegistryImpl::Throttles
PerformanceManagerRegistryImpl::CreateThrottlesForNavigation(
content::NavigationHandle* handle) { … }
void PerformanceManagerRegistryImpl::NotifyBrowserContextAdded(
content::BrowserContext* browser_context) { … }
void PerformanceManagerRegistryImpl::
CreateProcessNodeAndExposeInterfacesToRendererProcess(
service_manager::BinderRegistry* registry,
content::RenderProcessHost* render_process_host) { … }
void PerformanceManagerRegistryImpl::ExposeInterfacesToRenderFrame(
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) { … }
void PerformanceManagerRegistryImpl::NotifyBrowserContextRemoved(
content::BrowserContext* browser_context) { … }
void PerformanceManagerRegistryImpl::TearDown() { … }
void PerformanceManagerRegistryImpl::OnPerformanceManagerTabHelperDestroying(
content::WebContents* web_contents) { … }
void PerformanceManagerRegistryImpl::OnRenderProcessUserDataDestroying(
content::RenderProcessHost* render_process_host) { … }
void PerformanceManagerRegistryImpl::EnsureProcessNodeForRenderProcessHost(
content::RenderProcessHost* render_process_host) { … }
ProcessNodeImpl* PerformanceManagerRegistryImpl::GetBrowserProcessNode() { … }
ProcessNodeImpl* PerformanceManagerRegistryImpl::GetBrowserChildProcessNode(
BrowserChildProcessHostId id) { … }
WorkerNodeImpl* PerformanceManagerRegistryImpl::FindWorkerNodeForToken(
const blink::WorkerToken& token) { … }
WorkerWatcher* PerformanceManagerRegistryImpl::GetWorkerWatcherForTesting(
content::BrowserContext* browser_context) { … }
BrowserChildProcessWatcher&
PerformanceManagerRegistryImpl::GetBrowserChildProcessWatcherForTesting() { … }
void PerformanceManagerRegistryImpl::OnRenderProcessHostCreated(
content::RenderProcessHost* host) { … }
}