#include "chrome/browser/ui/views/page_info/page_info_bubble_view.h"
#include <memory>
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/page_info/chrome_page_info_delegate.h"
#include "chrome/browser/ui/page_info/chrome_page_info_ui_delegate.h"
#include "chrome/browser/ui/page_info/page_info_dialog.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/controls/page_switcher_view.h"
#include "chrome/browser/ui/views/page_info/page_info_main_view.h"
#include "chrome/browser/ui/views/page_info/page_info_security_content_view.h"
#include "chrome/browser/ui/views/page_info/page_info_view_factory.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/dom_distiller/core/url_utils.h"
#include "components/page_info/core/features.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/strings/grit/components_branded_strings.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/layout/box_layout.h"
AnchorConfiguration;
GetPageInfoAnchorConfiguration;
GetPageInfoAnchorRect;
class InternalPageInfoBubbleView : public PageInfoBubbleViewBase { … };
InternalPageInfoBubbleView::InternalPageInfoBubbleView(
views::View* anchor_view,
const gfx::Rect& anchor_rect,
gfx::NativeView parent_window,
content::WebContents* web_contents,
const GURL& url)
: … { … }
InternalPageInfoBubbleView::~InternalPageInfoBubbleView() = default;
BEGIN_METADATA(…)
PageInfoBubbleView::PageInfoBubbleView(
views::View* anchor_view,
const gfx::Rect& anchor_rect,
gfx::NativeView parent_window,
content::WebContents* associated_web_contents,
const GURL& url,
base::OnceClosure initialized_callback,
PageInfoClosingCallback closing_callback)
: … { … }
PageInfoBubbleView::~PageInfoBubbleView() { … }
views::BubbleDialogDelegateView* PageInfoBubbleView::CreatePageInfoBubble(
views::View* anchor_view,
const gfx::Rect& anchor_rect,
gfx::NativeWindow parent_window,
content::WebContents* web_contents,
const GURL& url,
base::OnceClosure initialized_callback,
PageInfoClosingCallback closing_callback) { … }
void PageInfoBubbleView::OpenMainPage(base::OnceClosure initialized_callback) { … }
void PageInfoBubbleView::OpenSecurityPage() { … }
void PageInfoBubbleView::OpenPermissionPage(ContentSettingsType type) { … }
void PageInfoBubbleView::OpenAdPersonalizationPage() { … }
void PageInfoBubbleView::OpenCookiesPage() { … }
void PageInfoBubbleView::CloseBubble() { … }
void PageInfoBubbleView::DidChangeVisibleSecurityState() { … }
void PageInfoBubbleView::OnWidgetDestroying(views::Widget* widget) { … }
void PageInfoBubbleView::WebContentsDestroyed() { … }
gfx::Size PageInfoBubbleView::CalculatePreferredSize(
const views::SizeBounds& available_size) const { … }
void PageInfoBubbleView::ChildPreferredSizeChanged(views::View* child) { … }
void PageInfoBubbleView::AnnouncePageOpened(std::u16string announcement) { … }
void ShowPageInfoDialogImpl(Browser* browser,
content::WebContents* web_contents,
const GURL& virtual_url,
bubble_anchor_util::Anchor anchor,
base::OnceClosure initialized_callback,
PageInfoClosingCallback closing_callback) { … }
BEGIN_METADATA(…)