Jason Hu | a06a229e | 2024-05-04 01:40:06 | [diff] [blame] | 1 | // Copyright 2024 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_UI_LENS_LENS_OVERLAY_PERMISSION_UTILS_H_ |
| 6 | #define CHROME_BROWSER_UI_LENS_LENS_OVERLAY_PERMISSION_UTILS_H_ |
| 7 | |
| 8 | class PrefService; |
| 9 | |
| 10 | namespace syncer { |
| 11 | class SyncService; |
| 12 | } // namespace syncer |
| 13 | |
Mohamad Ahmadi | eb5d122 | 2024-05-06 17:12:43 | [diff] [blame] | 14 | namespace user_prefs { |
| 15 | class PrefRegistrySyncable; |
| 16 | } // namespace user_prefs |
| 17 | |
Jason Hu | a06a229e | 2024-05-04 01:40:06 | [diff] [blame] | 18 | namespace lens { |
Mohamad Ahmadi | eb5d122 | 2024-05-06 17:12:43 | [diff] [blame] | 19 | namespace prefs { |
| 20 | |
Justin Donnelly | d470434 | 2024-05-28 20:32:26 | [diff] [blame^] | 21 | // The possible values for the Lens Overlay enterprise policy. The value is an |
| 22 | // integer rather than a boolean to allow for additional states to be added in |
| 23 | // the future. |
| 24 | enum class LensOverlaySettingsPolicyValue { |
| 25 | kEnabled = 0, |
| 26 | kDisabled = 1, |
| 27 | }; |
| 28 | |
| 29 | // An integer setting indicating whether the Lens Overlay feature is enabled or |
| 30 | // disabled by the 'LensOverlaySettings' enterprise policy. |
| 31 | inline constexpr char kLensOverlaySettings[] = |
| 32 | "lens.policy.lens_overlay_settings"; |
| 33 | |
Mohamad Ahmadi | eb5d122 | 2024-05-06 17:12:43 | [diff] [blame] | 34 | // A boolean indicating whether the whether the user has permitted sharing page |
| 35 | // screenshot with the Lens Overlay server. |
| 36 | inline constexpr char kLensSharingPageScreenshotEnabled[] = |
| 37 | "lens.sharing_page_screenshot.enabled"; |
| 38 | |
| 39 | // Registers the prefs used by the Lens Overlay. |
| 40 | void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 41 | |
| 42 | } // namespace prefs |
| 43 | |
| 44 | // Returns true if the user, i.e., the local, current profile, is permitted to |
| 45 | // share the the page screenshot with the Lens Overlay server. |
| 46 | bool CanSharePageScreenshotWithLensOverlay(PrefService* pref_service); |
Jason Hu | a06a229e | 2024-05-04 01:40:06 | [diff] [blame] | 47 | |
| 48 | // Returns true if the user, i.e., the local, current profile, is permitted to |
| 49 | // share the the page URL with the the Lens Overlay server. |
| 50 | bool CanSharePageURLWithLensOverlay(PrefService* pref_service); |
| 51 | |
| 52 | // Returns true if the user, i.e., the local, current profile, is permitted to |
| 53 | // share the information about the page title with the the Lens Overlay server. |
| 54 | bool CanSharePageTitleWithLensOverlay(syncer::SyncService* sync_service); |
| 55 | |
| 56 | } // namespace lens |
| 57 | |
| 58 | #endif // CHROME_BROWSER_UI_LENS_LENS_OVERLAY_PERMISSION_UTILS_H_ |