#include "chrome/browser/ui/views/toolbar/browser_app_menu_button.h"
#include <set>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/rand_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "build/chromeos_buildflags.h"
#include "cc/paint/paint_flags.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_otr_state.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/toolbar/app_menu_icon_controller.h"
#include "chrome/browser/ui/toolbar/app_menu_model.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/toolbar/app_menu.h"
#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/browser/user_education/tutorial_identifiers.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/animation_delegate_views.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/metrics.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/virtual_keyboard_controller.h"
#endif
namespace {
constexpr int kChromeRefreshImageLabelPadding = …;
}
bool BrowserAppMenuButton::g_open_app_immediately_for_testing = …;
BrowserAppMenuButton::BrowserAppMenuButton(ToolbarView* toolbar_view)
: … { … }
BrowserAppMenuButton::~BrowserAppMenuButton() { … }
void BrowserAppMenuButton::SetTypeAndSeverity(
AppMenuIconController::TypeAndSeverity type_and_severity) { … }
void BrowserAppMenuButton::ShowMenu(int run_types) { … }
AlertMenuItem BrowserAppMenuButton::GetAlertItemForRunningTutorial() { … }
void BrowserAppMenuButton::OnThemeChanged() { … }
void BrowserAppMenuButton::UpdateThemeBasedState() { … }
void BrowserAppMenuButton::UpdateIcon() { … }
void BrowserAppMenuButton::UpdateInkdrop() { … }
bool BrowserAppMenuButton::IsLabelPresentAndVisible() const { … }
SkColor BrowserAppMenuButton::GetForegroundColor(ButtonState state) const { … }
void BrowserAppMenuButton::UpdateTextAndHighlightColor() { … }
bool BrowserAppMenuButton::ShouldPaintBorder() const { … }
void BrowserAppMenuButton::UpdateLayoutInsets() { … }
std::optional<SkColor> BrowserAppMenuButton::GetHighlightTextColor() const { … }
std::optional<SkColor> BrowserAppMenuButton::GetHighlightColor() const { … }
void BrowserAppMenuButton::OnTouchUiChanged() { … }
void BrowserAppMenuButton::ButtonPressed(const ui::Event& event) { … }
BEGIN_METADATA(…)