Unify chip's title and icon for the request and quiet chips.
This CL adds to the PermissionRequest possibility to provide title and
icons for all kinds of the chip.
Bug: 1234752
Change-Id: I98239f60c3e4114f65115312495635271ae8debd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3234206
Reviewed-by: Kamila Hasanbega <[email protected]>
Reviewed-by: Olesia Marukhno <[email protected]>
Reviewed-by: Orin Jaworski <[email protected]>
Commit-Queue: Illia Klimov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933802}
diff --git a/components/permissions/permission_request.h b/components/permissions/permission_request.h
index 60fedbd..1be82ab 100644
--- a/components/permissions/permission_request.h
+++ b/components/permissions/permission_request.h
@@ -13,6 +13,7 @@
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/permissions/permission_request_enums.h"
+#include "components/permissions/request_type.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"
@@ -72,9 +73,21 @@
#endif
#if !defined(OS_ANDROID)
+ // Returns prompt icon appropriate for displaying on the chip button in the
+ // location bar.
+ IconId GetIconForChip();
+
+ // Returns prompt icon appropriate for displaying on the quiet chip button in
+ // the location bar.
+ IconId GetBlockedIconForChip();
+
// Returns prompt text appropriate for displaying on the chip button in the
// location bar.
- absl::optional<std::u16string> GetChipText() const;
+ absl::optional<std::u16string> GetRequestChipText() const;
+
+ // Returns prompt text appropriate for displaying on the quiet chip button in
+ // the location bar.
+ absl::optional<std::u16string> GetQuietChipText() const;
// Returns prompt text appropriate for displaying under the dialog title
// "[domain] wants to:".