#include "chrome/browser/permissions/one_time_permissions_tracker.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "chrome/browser/permissions/one_time_permissions_tracker_observer.h"
#include "chrome/browser/profiles/profile.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/permissions/features.h"
#include "components/permissions/permission_context_base.h"
#include "content/public/browser/visibility.h"
#include "url/gurl.h"
OneTimePermissionsTracker::OneTimePermissionsTracker() = default;
OneTimePermissionsTracker::~OneTimePermissionsTracker() = default;
OneTimePermissionsTracker::OriginTrackEntry::OriginTrackEntry() = default;
OneTimePermissionsTracker::OriginTrackEntry::~OriginTrackEntry() = default;
void OneTimePermissionsTracker::Shutdown() { … }
void OneTimePermissionsTracker::AddObserver(
OneTimePermissionsTrackerObserver* observer) { … }
void OneTimePermissionsTracker::RemoveObserver(
OneTimePermissionsTrackerObserver* observer) { … }
void OneTimePermissionsTracker::WebContentsBackgrounded(
const url::Origin& origin) { … }
void OneTimePermissionsTracker::WebContentsUnbackgrounded(
const url::Origin& origin) { … }
void OneTimePermissionsTracker::WebContentsLoadedOrigin(
const url::Origin& origin) { … }
void OneTimePermissionsTracker::WebContentsUnloadedOrigin(
const url::Origin& origin) { … }
void OneTimePermissionsTracker::StartContentSpecificExpirationTimer(
const url::Origin& origin,
ContentSettingsType content_setting,
NotifyFunction notify_callback) { … }
void OneTimePermissionsTracker::HandleUserMediaState(
const url::Origin& origin,
ContentSettingsType content_setting) { … }
void OneTimePermissionsTracker::CapturingVideoChanged(const url::Origin& origin,
bool is_capturing_video) { … }
void OneTimePermissionsTracker::CapturingAudioChanged(const url::Origin& origin,
bool is_capturing_audio) { … }
void OneTimePermissionsTracker::CleanupStateForExpiredContentSetting(
ContentSettingsType type,
ContentSettingsPattern primary_pattern,
ContentSettingsPattern secondary_pattern) { … }
void OneTimePermissionsTracker::FireRunningTimersForTesting() { … }
void OneTimePermissionsTracker::NotifyLastPageFromOriginClosed(
const url::Origin& origin) { … }
bool OneTimePermissionsTracker::ShouldIgnoreOrigin(const url::Origin& origin) { … }
void OneTimePermissionsTracker::NotifyBackgroundTimerExpired(
const url::Origin& origin,
const OneTimePermissionsTrackerObserver::BackgroundExpiryType&
expiry_type) { … }
void OneTimePermissionsTracker::NotifyCapturingVideoExpired(
const url::Origin& origin) { … }
void OneTimePermissionsTracker::NotifyCapturingAudioExpired(
const url::Origin& origin) { … }
bool OneTimePermissionsTracker::AreAllTabsToOriginBackgroundedOrDiscarded(
const url::Origin& origin) { … }