chromium/chrome/browser/ui/views/download/bubble/download_bubble_security_view.cc

// Copyright 2022 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/download/bubble/download_bubble_security_view.h"

#include "base/containers/fixed_flat_map.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/download/download_commands.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_item_warning_data.h"
#include "chrome/browser/download/download_ui_model.h"
#include "chrome/browser/download/offline_item_utils.h"
#include "chrome/browser/ui/download/download_bubble_security_view_info.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_password_prompt_view.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_row_view.h"
#include "chrome/browser/ui/views/download/bubble/download_toolbar_button_view.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/download/public/common/download_danger_type.h"
#include "components/safe_browsing/core/common/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/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/color/color_id.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/flex_layout_view.h"
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/window/dialog_client_view.h"

namespace {
ContentId;

constexpr int kProgressBarHeight =;
// Num of columns in the table layout, the width of which progress bar will
// span. The 5 columns are Download Icon, Padding, Status text,
// Main Button, Subpage Icon.
constexpr int kNumColumns =;
constexpr int kAfterParagraphSpacing =;

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class DownloadBubbleSubpageAction {};
const char kSubpageActionHistogram[] =;

// Whether we should page away from the security view and return to the primary
// view upon a download update.
bool ShouldReturnToPrimaryDialog(const DownloadBubbleSecurityViewInfo& info) {}

bool HandleButtonClickWithDefaultClose(
    base::WeakPtr<DownloadBubbleSecurityView> security_view_weak,
    DownloadCommands::Command command,
    bool is_secondary_button) {}

}  // namespace

// This class encapsulates a piece of text broken into several paragraphs.
class ParagraphsView : public views::View {};

BEGIN_METADATA()

bool DownloadBubbleSecurityView::IsInitialized() const {}

void DownloadBubbleSecurityView::AddHeader() {}

void DownloadBubbleSecurityView::BackButtonPressed() {}

void DownloadBubbleSecurityView::UpdateHeader() {}

void DownloadBubbleSecurityView::CloseBubble() {}

void DownloadBubbleSecurityView::UpdateIconAndText() {}

void DownloadBubbleSecurityView::UpdateSecondaryIconAndText() {}

void DownloadBubbleSecurityView::AddIconAndContents() {}

void DownloadBubbleSecurityView::AddSecondaryIconAndText() {}

void DownloadBubbleSecurityView::AddProgressBar() {}

void DownloadBubbleSecurityView::AddPasswordPrompt(views::View* parent) {}

bool DownloadBubbleSecurityView::ProcessButtonClick(
    DownloadCommands::Command command,
    bool is_secondary_button) {}

void DownloadBubbleSecurityView::MaybeLogDismiss() {}

const offline_items_collection::ContentId&
DownloadBubbleSecurityView::content_id() const {}

void DownloadBubbleSecurityView::UpdateButton(
    DownloadBubbleSecurityViewInfo::SubpageButton button_info,
    bool is_secondary_button) {}

void DownloadBubbleSecurityView::UpdateButtons() {}

void DownloadBubbleSecurityView::UpdateProgressBar() {}

void DownloadBubbleSecurityView::UpdatePasswordPrompt() {}

void DownloadBubbleSecurityView::ClearWideFields() {}

void DownloadBubbleSecurityView::RecordWarningActionTime(
    bool is_secondary_button) {}

void DownloadBubbleSecurityView::Reset() {}

void DownloadBubbleSecurityView::UpdateViews() {}

void DownloadBubbleSecurityView::UpdateAccessibilityTextAndFocus() {}

DownloadBubbleSecurityView::DownloadBubbleSecurityView(
    Delegate* delegate,
    const DownloadBubbleSecurityViewInfo& info,
    base::WeakPtr<DownloadBubbleNavigationHandler> navigation_handler,
    views::BubbleDialogDelegate* bubble_delegate)
    :{}

DownloadBubbleSecurityView::~DownloadBubbleSecurityView() = default;

int DownloadBubbleSecurityView::GetMinimumBubbleWidth() const {}

int DownloadBubbleSecurityView::GetMinimumTitleWidth() const {}

int DownloadBubbleSecurityView::GetMinimumLabelWidth() const {}

bool DownloadBubbleSecurityView::ProcessDeepScanClick() {}

bool DownloadBubbleSecurityView::ProcessLocalPasswordDecryptionClick() {}

void DownloadBubbleSecurityView::OnInfoChanged() {}

void DownloadBubbleSecurityView::OnContentIdChanged() {}

BEGIN_METADATA()