#include "components/page_load_metrics/browser/test_metrics_web_contents_observer_embedder.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#include "components/page_load_metrics/browser/page_load_tracker.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
namespace page_load_metrics {
namespace {
class TimingLoggingPageLoadMetricsObserver final
: public PageLoadMetricsObserver { … };
class FilteringPageLoadMetricsObserver final : public PageLoadMetricsObserver { … };
}
TestMetricsWebContentsObserverEmbedder::
TestMetricsWebContentsObserverEmbedder() = default;
TestMetricsWebContentsObserverEmbedder::
~TestMetricsWebContentsObserverEmbedder() = default;
bool TestMetricsWebContentsObserverEmbedder::IsNewTabPageUrl(const GURL& url) { … }
void TestMetricsWebContentsObserverEmbedder::RegisterObservers(
PageLoadTracker* tracker) { … }
std::unique_ptr<base::OneShotTimer>
TestMetricsWebContentsObserverEmbedder::CreateTimer() { … }
bool TestMetricsWebContentsObserverEmbedder::IsNoStatePrefetch(
content::WebContents* web_contents) { … }
bool TestMetricsWebContentsObserverEmbedder::IsExtensionUrl(const GURL& url) { … }
bool TestMetricsWebContentsObserverEmbedder::IsSidePanel(
content::WebContents* web_contents) { … }
bool TestMetricsWebContentsObserverEmbedder::IsNonTabWebUI() { … }
PageLoadMetricsMemoryTracker*
TestMetricsWebContentsObserverEmbedder::GetMemoryTrackerForBrowserContext(
content::BrowserContext* browser_context) { … }
}