#include "chrome/browser/ui/views/download/bubble/download_bubble_partial_view.h"
#include <string_view>
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/download/bubble/download_bubble_prefs.h"
#include "chrome/browser/download/bubble/download_bubble_ui_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/chrome_pages.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_row_list_view.h"
#include "chrome/browser/ui/views/download/bubble/download_toolbar_button_view.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/link_fragment.h"
#include "ui/views/controls/separator.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/table_layout.h"
namespace {
constexpr char kPartialBubbleVisibleHistogramName[] = …;
class CheckboxTargeter : public views::ViewTargeterDelegate { … };
class SuppressBubbleSettingRow : public views::View,
public views::ViewTargeterDelegate { … };
BEGIN_METADATA(…)
bool ShouldShowSuppressSetting(Profile* profile, int impressions) { … }
bool ShouldShowSettingsLink(int impressions) { … }
void MaybeRecordImpression(Profile* profile, int impressions) { … }
}
DownloadBubblePartialView::DownloadBubblePartialView(
base::WeakPtr<Browser> browser,
base::WeakPtr<DownloadBubbleUIController> bubble_controller,
base::WeakPtr<DownloadBubbleNavigationHandler> navigation_handler,
const DownloadBubbleRowListViewInfo& info,
base::OnceClosure on_interacted_closure)
: … { … }
DownloadBubblePartialView::~DownloadBubblePartialView() { … }
std::string_view DownloadBubblePartialView::GetVisibleTimeHistogramName()
const { … }
bool DownloadBubblePartialView::IsPartialView() const { … }
void DownloadBubblePartialView::AddedToWidget() { … }
void DownloadBubblePartialView::RemovedFromWidget() { … }
void DownloadBubblePartialView::OnInteracted() { … }
void DownloadBubblePartialView::OnWillChangeFocus(views::View* before,
views::View* now) { … }
void DownloadBubblePartialView::OnMouseEntered(const ui::MouseEvent& event) { … }
BEGIN_METADATA(…)