Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2022 The Chromium Authors |
Lijin Shen | 20a1b6e | 2022-01-15 00:52:50 | [diff] [blame] | 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_PERMISSIONS_QUIET_PERMISSION_PROMPT_MODEL_ANDROID_H_ |
| 6 | #define CHROME_BROWSER_PERMISSIONS_QUIET_PERMISSION_PROMPT_MODEL_ANDROID_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
Ravjit | 4f50565 | 2024-05-02 16:37:56 | [diff] [blame] | 10 | #include "components/content_settings/core/common/content_settings_types.h" |
Lijin Shen | 20a1b6e | 2022-01-15 00:52:50 | [diff] [blame] | 11 | #include "components/permissions/permission_ui_selector.h" |
| 12 | #include "url/gurl.h" |
| 13 | |
| 14 | // Model representing the expected UI labels on different surfaces and behaviors |
| 15 | // on related events. |
| 16 | struct QuietPermissionPromptModelAndroid { |
| 17 | enum class PrimaryButtonBehavior { |
| 18 | kAllowForThisSite, |
| 19 | kContinueBlocking, |
| 20 | }; |
| 21 | |
| 22 | enum class SecondaryButtonBehavior { |
| 23 | kShowSettings, |
| 24 | kAllowForThisSite, |
| 25 | }; |
| 26 | |
| 27 | QuietPermissionPromptModelAndroid(); |
| 28 | QuietPermissionPromptModelAndroid( |
| 29 | const QuietPermissionPromptModelAndroid& other); |
| 30 | ~QuietPermissionPromptModelAndroid(); |
| 31 | |
| 32 | std::u16string title; |
| 33 | std::u16string description; |
| 34 | std::u16string primary_button_label; |
| 35 | std::u16string secondary_button_label; |
| 36 | std::u16string learn_more_text; |
| 37 | PrimaryButtonBehavior primary_button_behavior; |
| 38 | SecondaryButtonBehavior secondary_button_behavior; |
| 39 | }; |
| 40 | |
Ravjit | 4f50565 | 2024-05-02 16:37:56 | [diff] [blame] | 41 | QuietPermissionPromptModelAndroid GetQuietPermissionPromptModel( |
| 42 | permissions::PermissionUiSelector::QuietUiReason reason, |
| 43 | ContentSettingsType content_settings_type); |
Lijin Shen | 20a1b6e | 2022-01-15 00:52:50 | [diff] [blame] | 44 | |
| 45 | GURL GetNotificationBlockedLearnMoreUrl(); |
| 46 | |
| 47 | #endif // CHROME_BROWSER_PERMISSIONS_QUIET_PERMISSION_PROMPT_MODEL_ANDROID_H_ |