chromium/components/performance_manager/execution_context/execution_context_registry_impl.cc

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

#include "components/performance_manager/execution_context/execution_context_registry_impl.h"

#include "base/check.h"
#include "base/memory/raw_ref.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "components/performance_manager/execution_context/execution_context_impl.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/graph/worker_node_impl.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
#include "url/gurl.h"

namespace performance_manager {
namespace execution_context {

namespace {

// std::unordered_set doesn't support transparent keys until C++20, so we use
// a custom ExecutionContext wrapper for the time being.
class DummyExecutionContextForLookup : public ExecutionContext {};

}  // namespace

////////////////////////////////////////////////////////////////////////////////
// ExecutionContextRegistry

ExecutionContextRegistry::ExecutionContextRegistry() = default;

ExecutionContextRegistry::~ExecutionContextRegistry() = default;

// static
ExecutionContextRegistry* ExecutionContextRegistry::GetFromGraph(Graph* graph) {}

// static
const ExecutionContext*
ExecutionContextRegistry::GetExecutionContextForFrameNode(
    const FrameNode* frame_node) {}

// static
const ExecutionContext*
ExecutionContextRegistry::GetExecutionContextForWorkerNode(
    const WorkerNode* worker_node) {}

////////////////////////////////////////////////////////////////////////////////
// ExecutionContextRegistryImpl

ExecutionContextRegistryImpl::ExecutionContextRegistryImpl() {}

ExecutionContextRegistryImpl::~ExecutionContextRegistryImpl() = default;

void ExecutionContextRegistryImpl::AddObserver(
    ExecutionContextObserver* observer) {}

bool ExecutionContextRegistryImpl::HasObserver(
    ExecutionContextObserver* observer) const {}

void ExecutionContextRegistryImpl::RemoveObserver(
    ExecutionContextObserver* observer) {}

const ExecutionContext*
ExecutionContextRegistryImpl::GetExecutionContextByToken(
    const blink::ExecutionContextToken& token) {}

const FrameNode* ExecutionContextRegistryImpl::GetFrameNodeByFrameToken(
    const blink::LocalFrameToken& token) {}

const WorkerNode* ExecutionContextRegistryImpl::GetWorkerNodeByWorkerToken(
    const blink::WorkerToken& token) {}

const ExecutionContext*
ExecutionContextRegistryImpl::GetExecutionContextForFrameNodeImpl(
    const FrameNode* frame_node) {}

const ExecutionContext*
ExecutionContextRegistryImpl::GetExecutionContextForWorkerNodeImpl(
    const WorkerNode* worker_node) {}

void ExecutionContextRegistryImpl::SetUp(Graph* graph) {}

void ExecutionContextRegistryImpl::TearDown(Graph* graph) {}

void ExecutionContextRegistryImpl::OnFrameNodeAdded(
    const FrameNode* frame_node) {}

void ExecutionContextRegistryImpl::OnBeforeFrameNodeRemoved(
    const FrameNode* frame_node) {}

void ExecutionContextRegistryImpl::OnPriorityAndReasonChanged(
    const FrameNode* frame_node,
    const PriorityAndReason& previous_value) {}

void ExecutionContextRegistryImpl::OnWorkerNodeAdded(
    const WorkerNode* worker_node) {}

void ExecutionContextRegistryImpl::OnBeforeWorkerNodeRemoved(
    const WorkerNode* worker_node) {}

void ExecutionContextRegistryImpl::OnPriorityAndReasonChanged(
    const WorkerNode* worker_node,
    const PriorityAndReason& previous_value) {}

////////////////////////////////////////////////////////////////////////////////
// ExecutionContextRegistryImpl::ExecutionContextHash

size_t ExecutionContextRegistryImpl::ExecutionContextHash::operator()(
    const ExecutionContext* ec) const {}

////////////////////////////////////////////////////////////////////////////////
// ExecutionContextRegistryImpl::ExecutionContextKeyEqual

bool ExecutionContextRegistryImpl::ExecutionContextKeyEqual::operator()(
    const ExecutionContext* ec1,
    const ExecutionContext* ec2) const {}

}  // namespace execution_context
}  // namespace performance_manager