chromium/chrome/browser/ui/views/page_info/page_info_view_factory.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/page_info/page_info_view_factory.h"

#include <memory>
#include <string>

#include "base/feature_list.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/page_info/page_info_features.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/page_info/chrome_page_info_ui_delegate.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/page_info/page_info_ad_personalization_content_view.h"
#include "chrome/browser/ui/views/page_info/page_info_cookies_content_view.h"
#include "chrome/browser/ui/views/page_info/page_info_main_view.h"
#include "chrome/browser/ui/views/page_info/page_info_navigation_handler.h"
#include "chrome/browser/ui/views/page_info/page_info_permission_content_view.h"
#include "chrome/browser/ui/views/page_info/page_info_security_content_view.h"
#include "components/page_info/core/features.h"
#include "components/page_info/core/proto/about_this_site_metadata.pb.h"
#include "components/page_info/page_info.h"
#include "components/permissions/permission_util.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/color/color_id.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/vector_icons.h"

constexpr int PageInfoViewFactory::kMinBubbleWidth;
constexpr int PageInfoViewFactory::kMaxBubbleWidth;

namespace {

class PageInfoSubpageView : public views::View {};

int GetIconSize() {}

}  // namespace

// static
std::unique_ptr<views::View> PageInfoViewFactory::CreateSeparator(
    int horizontal_inset) {}

// static
std::unique_ptr<views::View> PageInfoViewFactory::CreateLabelWrapper() {}

PageInfoViewFactory::PageInfoViewFactory(
    PageInfo* presenter,
    ChromePageInfoUiDelegate* ui_delegate,
    PageInfoNavigationHandler* navigation_handler,
    PageInfoHistoryController* history_controller)
    :{}

std::unique_ptr<views::View> PageInfoViewFactory::CreateMainPageView(
    base::OnceClosure initialized_callback) {}

std::unique_ptr<views::View> PageInfoViewFactory::CreateSecurityPageView() {}

std::unique_ptr<views::View> PageInfoViewFactory::CreatePermissionPageView(
    ContentSettingsType type,
    content::WebContents* web_contents) {}

std::unique_ptr<views::View>
PageInfoViewFactory::CreateAdPersonalizationPageView() {}

std::unique_ptr<views::View> PageInfoViewFactory::CreateCookiesPageView() {}

std::unique_ptr<views::View> PageInfoViewFactory::CreateSubpageHeader(
    std::u16string title,
    std::u16string subtitle) {}

// static
const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
    const PageInfo::PermissionInfo& info,
    bool blocked_on_system_level) {}

// static
const ui::ImageModel PageInfoViewFactory::GetChosenObjectIcon(
    const PageInfoUI::ChosenObjectInfo& object,
    bool deleted) {}

// static
const ui::ImageModel PageInfoViewFactory::GetValidCertificateIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetInvalidCertificateIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetSiteSettingsIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetVrSettingsIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetLaunchIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetConnectionNotSecureIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetConnectionDangerousIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetConnectionSecureIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetOpenSubpageIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetAboutThisSiteIcon() {}

// static
const gfx::VectorIcon& PageInfoViewFactory::GetAboutThisSiteColorVectorIcon() {}

// static
const gfx::VectorIcon& PageInfoViewFactory::GetAboutThisSiteVectorIcon() {}
// static
const ui::ImageModel PageInfoViewFactory::GetHistoryIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetAdPersonalizationIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetManagedPermissionIcon(
    const PageInfo::PermissionInfo& info) {}

// static
const ui::ImageModel PageInfoViewFactory::GetThirdPartyCookiesIcon(
    bool third_party_cookies_enabled) {}

// static
const ui::ImageModel PageInfoViewFactory::GetBlockingThirdPartyCookiesIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetBusinessIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetCookiesAndSiteDataIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetRwsIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetEnforcedByPolicyIcon() {}

// static
const ui::ImageModel PageInfoViewFactory::GetImageModel(
    const gfx::VectorIcon& icon) {}