chromium/components/performance_manager/execution_context/execution_context_registry_impl.h

// 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.

#ifndef COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_EXECUTION_CONTEXT_REGISTRY_IMPL_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_EXECUTION_CONTEXT_REGISTRY_IMPL_H_

#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
#include "base/sequence_checker.h"
#include "components/performance_manager/public/execution_context/execution_context_registry.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/graph_registered.h"
#include "components/performance_manager/public/graph/worker_node.h"
#include "third_party/blink/public/common/tokens/tokens.h"

namespace performance_manager {
namespace execution_context {

class ExecutionContext;

// The ExecutionContextRegistry is a GraphRegistered class that allows for
// observers to be registered, and for ExecutionContexts to be looked up by
// their tokens. SetUp() must be called prior to any nodes being created.
class ExecutionContextRegistryImpl
    : public ExecutionContextRegistry,
      public GraphRegisteredImpl<ExecutionContextRegistryImpl>,
      public FrameNode::ObserverDefaultImpl,
      public WorkerNode::ObserverDefaultImpl {};

}  // namespace execution_context
}  // namespace performance_manager

#endif  // COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_EXECUTION_CONTEXT_REGISTRY_IMPL_H_