chromium/components/performance_manager/resource_attribution/frame_context.cc

// Copyright 2023 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/public/resource_attribution/frame_context.h"

#include <optional>
#include <sstream>
#include <utility>

#include "base/check.h"
#include "base/memory/weak_ptr.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/graph/process_node_impl.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/performance_manager.h"
#include "components/performance_manager/public/render_process_host_id.h"
#include "components/performance_manager/resource_attribution/performance_manager_aliases.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/render_frame_host.h"

namespace resource_attribution {

namespace {

bool IsValidId(content::GlobalRenderFrameHostId id) {}

}  // namespace

FrameContext::FrameContext(content::GlobalRenderFrameHostId id,
                           base::WeakPtr<FrameNode> weak_node)
    :{}

FrameContext::~FrameContext() = default;

FrameContext::FrameContext(const FrameContext& other) = default;

FrameContext& FrameContext::operator=(const FrameContext& other) = default;

FrameContext::FrameContext(FrameContext&& other) = default;

FrameContext& FrameContext::operator=(FrameContext&& other) = default;

// static
std::optional<FrameContext> FrameContext::FromRenderFrameHost(
    content::RenderFrameHost* host) {}

content::RenderFrameHost* FrameContext::GetRenderFrameHost() const {}

content::GlobalRenderFrameHostId FrameContext::GetRenderFrameHostId() const {}

base::WeakPtr<FrameNode> FrameContext::GetWeakFrameNode() const {}

// static
FrameContext FrameContext::FromFrameNode(const FrameNode* node) {}

// static
std::optional<FrameContext> FrameContext::FromWeakFrameNode(
    base::WeakPtr<FrameNode> node) {}

FrameNode* FrameContext::GetFrameNode() const {}

std::string FrameContext::ToString() const {}

}  // namespace resource_attribution