blob: 5b102c87387d72ea33f59473209e2ac1d4517d5e [file] [log] [blame]
// 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.
#ifndef CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_UTILS_H_
#define CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_UTILS_H_
#include "chrome/browser/resource_coordinator/lifecycle_unit.h"
#include "content/public/browser/web_contents.h"
#include "url/gurl.h"
namespace high_efficiency {
// Returns whether |url| supports showing discard indicators
bool IsURLSupported(GURL url);
// Returns the discard reason if |contents| has been discarded
absl::optional<::mojom::LifecycleUnitDiscardReason> GetDiscardReason(
content::WebContents* contents);
} // namespace high_efficiency
#endif // CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_UTILS_H_