1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
// Copyright 2024 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_GLIC_GLIC_PREF_NAMES_H_
#define CHROME_BROWSER_GLIC_GLIC_PREF_NAMES_H_
class PrefRegistrySimple;
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
namespace glic::prefs {
// ************* LOCAL STATE PREFS ***************
// These prefs are per-Chrome-installation
// Boolean pref that enables or disables the launcher.
inline constexpr char kGlicLauncherEnabled[] = "glic.launcher_enabled";
// String pref that keeps track of the non-localized version of the registered
// hotkey for Glic.
inline constexpr char kGlicLauncherHotkey[] = "glic.launcher_hotkey";
// String pref that keeps track of the non-localized version of the registered
// hotkey for toggling focus between Glic and the browser window.
inline constexpr char kGlicFocusToggleHotkey[] = "glic.focus_toggle_hotkey";
// ************* PROFILE PREFS ***************
// Prefs below are tied to a user profile
// Value enums for the browser.gemini_settings pref. Integer pref that
// determines Glic enabling state for this user profile. This is controlled from
// enterprise policy.
// TODO(crbug.com/393537628): This should be moved to a less Glic-specific
// place.
enum class SettingsPolicyState {
kMinValue = 0,
kEnabled = kMinValue,
kDisabled = 1,
kMaxValue = kDisabled
};
// Value enums for the glic.completed_fre pref. Integer pref that determines the
// Fre status for user profile.
enum class FreStatus {
kMinValue = 0,
kNotStarted = kMinValue,
kCompleted = 1,
kIncomplete = 2,
kMaxValue = kIncomplete
};
// Boolean pref that determines if the glic button in tabstrip is pinned.
inline constexpr char kGlicPinnedToTabstrip[] = "glic.pinned_to_tabstrip";
// Boolean pref that enables or disables geolocation access for Glic.
inline constexpr char kGlicGeolocationEnabled[] = "glic.geolocation_enabled";
// Boolean pref that enables or disables microphone access for Glic.
inline constexpr char kGlicMicrophoneEnabled[] = "glic.microphone_enabled";
// Boolean pref that enables or disables tab context for Glic.
inline constexpr char kGlicTabContextEnabled[] = "glic.tab_context_enabled";
// Boolean pref that determines the rollout eligibility for the user profile.
inline constexpr char kGlicRolloutEligibility[] =
"sync.glic_rollout_eligibility";
// Dict pref that records user status.
inline constexpr char kGlicUserStatus[] = "glic.user_status";
// Integer pref that determines the Fre status for user profile. Values are from
// the FreStatus enum.
inline constexpr char kGlicCompletedFre[] = "glic.completed_fre";
// Time pref that records the last time a user dismissed the Glic window.
inline constexpr char kGlicWindowLastDismissedTime[] =
"glic.window.last_dimissed_time";
// Integer prefs for the top right corner of the previous window position.
inline constexpr char kGlicPreviousPositionX[] = "glic.previous_bounds.x";
inline constexpr char kGlicPreviousPositionY[] = "glic.previous_bounds.y";
// Bool pref for the closed captioning setting.
inline constexpr char kGlicClosedCaptioningEnabled[] =
"glic.closed_captioning_enabled";
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
} // namespace glic::prefs
#endif // CHROME_BROWSER_GLIC_GLIC_PREF_NAMES_H_
|