#include "chrome/browser/ui/views/extensions/extensions_request_access_button.h"
#include <algorithm>
#include <iterator>
#include <memory>
#include <string>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/string_util.h"
#include "chrome/browser/extensions/extension_action_runner.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/extensions_container.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/browser/ui/views/extensions/extensions_dialogs_utils.h"
#include "chrome/browser/ui/views/extensions/extensions_request_access_hover_card_coordinator.h"
#include "chrome/browser/ui/views/toolbar/toolbar_chip_button.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/event_constants.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/views/view_class_properties.h"
namespace {
constexpr auto kConfirmationDisplayDuration = …;
std::vector<const extensions::Extension*> GetExtensions(
Profile* profile,
std::vector<extensions::ExtensionId>& extension_ids) { … }
}
ExtensionsRequestAccessButton::ExtensionsRequestAccessButton(
Browser* browser,
ExtensionsContainer* extensions_container)
: … { … }
ExtensionsRequestAccessButton::~ExtensionsRequestAccessButton() = default;
void ExtensionsRequestAccessButton::Update(
std::vector<extensions::ExtensionId>& extension_ids) { … }
void ExtensionsRequestAccessButton::MaybeShowHoverCard() { … }
void ExtensionsRequestAccessButton::ResetConfirmation() { … }
bool ExtensionsRequestAccessButton::IsShowingConfirmation() const { … }
size_t ExtensionsRequestAccessButton::GetExtensionsCount() const { … }
bool ExtensionsRequestAccessButton::IsShowingConfirmationFor(
const url::Origin& origin) const { … }
std::u16string ExtensionsRequestAccessButton::GetTooltipText(
const gfx::Point& p) const { … }
bool ExtensionsRequestAccessButton::ShouldShowInkdropAfterIphInteraction() { … }
void ExtensionsRequestAccessButton::OnButtonPressed() { … }
content::WebContents* ExtensionsRequestAccessButton::GetActiveWebContents()
const { … }
BEGIN_METADATA(…)