blob: f336481fbf45278eaa164b8c65010148d05d3f4b [file] [log] [blame]
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_INTELLIGENCE_FEATURES_FEATURES_H_
#define IOS_CHROME_BROWSER_INTELLIGENCE_FEATURES_FEATURES_H_
#import "base/feature_list.h"
namespace base {
class TimeDelta;
} // namespace base
// Feature flag controlling whether enhanced calendar is enabled.
BASE_DECLARE_FEATURE(kEnhancedCalendar);
// Returns true if enhanced calendar is enabled.
bool IsEnhancedCalendarEnabled();
// Feature flag controlling the proactive suggestions framework.
BASE_DECLARE_FEATURE(kProactiveSuggestionsFramework);
// Returns true if the proactive suggestions framework is enabled.
bool IsProactiveSuggestionsFrameworkEnabled();
// Feature flag controlling the page action menu.
BASE_DECLARE_FEATURE(kPageActionMenu);
// Returns true if the page action menu is enabled.
bool IsPageActionMenuEnabled();
// Feature flag controlling the Ask Gemini chip.
BASE_DECLARE_FEATURE(kAskGeminiChip);
// Returns true if the Ask Gemini chip is enabled.
bool IsAskGeminiChipEnabled();
// Feature flag controlling the cross-tab floaty chat persistence.
BASE_DECLARE_FEATURE(kGeminiCrossTab);
// Returns true if the cross-tab chat persistence is enabled for the floaty.
bool IsGeminiCrossTabEnabled();
// Whether the omnibox entry point opens the BWG overlay immediately, skipping
// the AI hub.
bool IsDirectBWGEntryPoint();
extern const char kPageActionMenuDirectEntryPointParam[];
// The BWG session validity duration in minutes.
const base::TimeDelta BWGSessionValidityDuration();
extern const char kBWGSessionValidityDurationParam[];
// Holds the variations of the BWG Promo Consent flow.
enum class BWGPromoConsentVariations {
kDisabled = 0,
kSinglePage = 1,
kDoublePage = 2,
kSkipConsent = 3,
kForceFRE = 4,
kSkipNewUserDelay = 5,
};
extern const char kBWGPromoConsentParams[];
// Returns the variation of the BWG Promo Consent flow.
BWGPromoConsentVariations BWGPromoConsentVariationsParam();
// Returns YES if the promo should be forced.
bool ShouldForceBWGPromo();
// Returns YES if the Chrome FRE recency check should be skipped when evaluating
// whether to show the Gemini on-navigation promo.
bool ShouldSkipBWGPromoNewUserDelay();
// Feature flag to enable BWG Promo Consent.
BASE_DECLARE_FEATURE(kBWGPromoConsent);
extern const char kExplainGeminiEditMenuParams[];
// Holds the position of Explain Gemini button in the EditMenu.
enum class PositionForExplainGeminiEditMenu {
kDisabled = 0,
kAfterEdit = 1,
kAfterSearch = 2,
};
// Returns the position of Explain Gemini in the EditMenu.
PositionForExplainGeminiEditMenu ExplainGeminiEditMenuPosition();
// Feature flag to enable Explain Gemini in Edit Menu.
BASE_DECLARE_FEATURE(kExplainGeminiEditMenu);
// Feature flag to enable Precise Location in BWG Settings Menu.
BASE_DECLARE_FEATURE(kBWGPreciseLocation);
// Returns true if the precise location setting is enabled.
bool IsBWGPreciseLocationEnabled();
// Feature flag controlling the inclusion of anchor tags (links) in Page
// Context.
BASE_DECLARE_FEATURE(kPageContextAnchorTags);
// Returns true if the anchor tags are enabled in Page Context.
bool IsPageContextAnchorTagsEnabled();
// Feature flag controlling whether Gemini is available for managed accounts.
BASE_DECLARE_FEATURE(kGeminiForManagedAccounts);
// Returns true if Gemini is available for managed accounts. If true, can still
// be disabled by an Enterprise policy.
bool IsGeminiAvailableForManagedAccounts();
// Feature flag to show the AI Hub new badge.
BASE_DECLARE_FEATURE(kAIHubNewBadge);
// Whether the Gemini consent pref should be deleted on account change.
bool ShouldDeleteGeminiConsentPref();
// Feature flag to delete the Gemini consent pref.
BASE_DECLARE_FEATURE(kDeleteGeminiConsentPref);
// Feature flag to enable smart tab grouping.
BASE_DECLARE_FEATURE(kSmartTabGrouping);
// Returns true if smart tab grouping is enabled.
bool IsSmartTabGroupingEnabled();
// Returns true if tab context persisting is enabled.
bool IsPersistTabContextEnabled();
// Feature flag to persist tab context.
BASE_DECLARE_FEATURE(kPersistTabContext);
// Feature flag for the automatic Gemini promo shown on navigation.
BASE_DECLARE_FEATURE(kGeminiNavigationPromo);
// Returns true if the Gemini navigation promo is enabled.
bool IsGeminiNavigationPromoEnabled();
#endif // IOS_CHROME_BROWSER_INTELLIGENCE_FEATURES_FEATURES_H_