#include "chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view.h"
#include "base/functional/bind.h"
#include "chrome/browser/lookalikes/safety_tip_ui_helper.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/accessibility/theme_tracking_non_accessible_image_view.h"
#include "chrome/browser/ui/views/bubble_anchor_util_views.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/page_info/page_info_view_factory.h"
#include "chrome/grit/theme_resources.h"
#include "components/security_state/core/security_state.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/navigation_handle.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_utils.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/style/typography.h"
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
SafetyTipPageInfoBubbleView::SafetyTipPageInfoBubbleView(
views::View* anchor_view,
const gfx::Rect& anchor_rect,
gfx::NativeView parent_window,
content::WebContents* web_contents,
security_state::SafetyTipStatus safety_tip_status,
const GURL& suggested_url,
base::OnceCallback<void(SafetyTipInteraction)> close_callback)
: … { … }
SafetyTipPageInfoBubbleView::~SafetyTipPageInfoBubbleView() { … }
void SafetyTipPageInfoBubbleView::OnWidgetDestroying(views::Widget* widget) { … }
void SafetyTipPageInfoBubbleView::ExecuteLeaveCommand() { … }
void SafetyTipPageInfoBubbleView::OpenHelpCenter() { … }
void SafetyTipPageInfoBubbleView::RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) { … }
void SafetyTipPageInfoBubbleView::OnVisibilityChanged(
content::Visibility visibility) { … }
void SafetyTipPageInfoBubbleView::PrimaryPageChanged(content::Page& page) { … }
void SafetyTipPageInfoBubbleView::DidChangeVisibleSecurityState() { … }
void ShowSafetyTipDialog(
content::WebContents* web_contents,
security_state::SafetyTipStatus safety_tip_status,
const GURL& suggested_url,
base::OnceCallback<void(SafetyTipInteraction)> close_callback) { … }
PageInfoBubbleViewBase* CreateSafetyTipBubbleForTesting(
gfx::NativeView parent_view,
content::WebContents* web_contents,
security_state::SafetyTipStatus safety_tip_status,
const GURL& suggested_url,
base::OnceCallback<void(SafetyTipInteraction)> close_callback) { … }