chromium/components/page_load_metrics/browser/page_load_metrics_memory_tracker.h

// Copyright 2021 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_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_MEMORY_TRACKER_H_
#define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_MEMORY_TRACKER_H_

#include "base/containers/flat_map.h"
#include "base/feature_list.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
#include "components/performance_manager/public/v8_memory/v8_detailed_memory_any_seq.h"
#include "content/public/browser/render_frame_host.h"

features  // namespace features

namespace page_load_metrics {

// PageLoadMetricsMemoryTracker tracks per-frame memory usage by V8 and
// forwards an individual per-frame measurement to the
// MetricsWebContentsObserver associated with the WebContents containing that
// frame.
class PageLoadMetricsMemoryTracker
    : public KeyedService,
      public performance_manager::v8_memory::V8DetailedMemoryObserverAnySeq {};

}  // namespace page_load_metrics

#endif  // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_MEMORY_TRACKER_H_