#include "chrome/browser/ui/views/permissions/chip/permission_prompt_chip_model.h"
#include "base/check.h"
#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
#include "components/permissions/permission_actions_history.h"
#include "components/permissions/permission_request_manager.h"
#include "components/permissions/permission_util.h"
#include "components/permissions/request_type.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/vector_icon_types.h"
namespace {
const gfx::VectorIcon& GetBlockedPermissionIconId(
permissions::PermissionPrompt::Delegate* delegate) { … }
const gfx::VectorIcon& GetPermissionIconId(
permissions::PermissionPrompt::Delegate* delegate) { … }
std::u16string GetQuietPermissionMessage(
permissions::PermissionPrompt::Delegate* delegate) { … }
std::u16string GetLoudPermissionMessage(
permissions::PermissionPrompt::Delegate* delegate) { … }
bool ShouldPermissionBubbleExpand(
permissions::PermissionPrompt::Delegate* delegate,
PermissionPromptStyle prompt_style) { … }
}
PermissionPromptChipModel::PermissionPromptChipModel(
base::WeakPtr<permissions::PermissionPrompt::Delegate> delegate)
: … { … }
PermissionPromptChipModel::~PermissionPromptChipModel() = default;
void PermissionPromptChipModel::UpdateAutoCollapsePromptChipState(
bool is_collapsed) { … }
bool PermissionPromptChipModel::IsExpandAnimationAllowed() { … }
void PermissionPromptChipModel::UpdateWithUserDecision(
permissions::PermissionAction user_decision) { … }