chromium/content/browser/preloading/prefetcher.h

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

#ifndef CONTENT_BROWSER_PRELOADING_PREFETCHER_H_
#define CONTENT_BROWSER_PRELOADING_PREFETCHER_H_

#include "content/browser/preloading/speculation_host_devtools_observer.h"
#include "content/public/browser/speculation_host_delegate.h"
#include "services/network/public/mojom/devtools_observer.mojom-forward.h"

namespace content {

class RenderFrameHost;
class RenderFrameHostImpl;
class PreloadingPredictor;

// Handles speculation-rules bases prefetches.
// TODO(isaboori  crbug.com/1384496): Currently Prefetcher class supports the
// integration of speculation rule based prefetches with the DevTools. It serves
// as an abstraction layer to avoid implementing the DevTools logic twice in
// SpeculationHostDelegate and PrefetchDocumentManager. After the refactoring of
// SpeculationHostDelegate, we can get rid of this layer and implement all the
// logic in a single class by merging existing Prefetcher and
// PrefetchDocumentManager into a single class. We should also rename
// SpeculationHostDevToolsObserver to PrefetcherDevToolsObserver and the class
// declaration should be moved to this header file.
class CONTENT_EXPORT Prefetcher : public SpeculationHostDevToolsObserver {};

}  // namespace content

#endif  // CONTENT_BROWSER_PRELOADING_PREFETCHER_H_