#include "chrome/browser/ui/views/autofill/popup/popup_base_view.h"
#include <algorithm>
#include <memory>
#include <string_view>
#include <utility>
#include "base/dcheck_is_on.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/i18n/rtl.h"
#include "base/location.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/views/autofill/popup/custom_cursor_suppressor.h"
#include "chrome/browser/ui/views/autofill/popup/popup_view_utils.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/contents_web_view.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/password_manager/core/browser/features/password_features.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_contents.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/platform/ax_platform_node.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/scrollbar_size.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/controls/menu/menu_config.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/widget/widget.h"
#if DCHECK_IS_ON()
#include "base/containers/fixed_flat_set.h"
#endif
namespace autofill {
namespace {
constexpr int kMaximumAllowedCustomCursorDimension = …;
constexpr int kMaximumPixelsToMoveSuggestionToCenter = …;
constexpr int kMaximumWidthPercentageToMoveTheSuggestionToCenter = …;
constexpr int kMaxPopupWebContentsTopYOverflow = …;
std::unique_ptr<views::Border> CreateBorder() { … }
}
int PopupBaseView::GetCornerRadius() { … }
int PopupBaseView::ArrowHorizontalMargin() { … }
class PopupBaseView::Widget : public views::Widget { … };
PopupBaseView::PopupBaseView(
base::WeakPtr<AutofillPopupViewDelegate> delegate,
views::Widget* parent_widget,
views::Widget::InitParams::Activatable new_widget_activatable,
bool show_arrow_pointer)
: … { … }
PopupBaseView::~PopupBaseView() { … }
Browser* PopupBaseView::GetBrowser() { … }
bool PopupBaseView::DoShow() { … }
void PopupBaseView::DoHide() { … }
void PopupBaseView::NotifyAXSelection(views::View& selected_view) { … }
void PopupBaseView::OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) { … }
void PopupBaseView::OnWidgetDestroying(views::Widget* widget) { … }
void PopupBaseView::RemoveWidgetObservers() { … }
void PopupBaseView::UpdateClipPath() { … }
gfx::Rect PopupBaseView::GetContentAreaBounds() const { … }
gfx::Rect PopupBaseView::GetTopWindowBounds() const { … }
gfx::Rect PopupBaseView::GetOptimalPositionAndPlaceArrowOnPopup(
const gfx::Rect& element_bounds,
const gfx::Rect& max_bounds_for_popup,
const gfx::Size& preferred_size,
base::span<const views::BubbleArrowSide> preferred_popup_sides) { … }
bool PopupBaseView::DoUpdateBoundsAndRedrawPopup() { … }
void PopupBaseView::OnNativeFocusChanged(gfx::NativeView focused_now) { … }
void PopupBaseView::HideController(SuggestionHidingReason reason) { … }
content::WebContents* PopupBaseView::GetWebContents() const { … }
BEGIN_METADATA(…)
}