#include "chrome/browser/ui/tabs/organization/trigger.h"
#include "base/time/default_tick_clock.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/organization/tab_data.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_service.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_service_factory.h"
#include "chrome/browser/ui/tabs/organization/trigger_policies.h"
#include "chrome/browser/ui/tabs/tab_group_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/ui_features.h"
#include "tab_sensitivity_cache.h"
namespace {
float ScoringFunction(float sensitivity_threshold, TabStripModel* const model) { … }
}
TabOrganizationTrigger::TabOrganizationTrigger(
TriggerScoringFunction scoring_function,
float score_threshold,
std::unique_ptr<TriggerPolicy> policy)
: … { … }
TabOrganizationTrigger::~TabOrganizationTrigger() = default;
bool TabOrganizationTrigger::ShouldTrigger(
TabStripModel* const tab_strip_model) const { … }
TriggerScoringFunction GetTriggerScoringFunction() { … }
float GetTriggerScoreThreshold() { … }
float GetSensitivityThreshold() { … }
std::unique_ptr<TriggerPolicy> GetTriggerPolicy(
BackoffLevelProvider* backoff_level_provider) { … }
std::unique_ptr<TabOrganizationTrigger> MakeTrigger(
BackoffLevelProvider* backoff_level_provider) { … }