#include "ui/message_center/views/notification_view.h"
#include <memory>
#include "build/build_config.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/text_elider.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/views/notification_background_painter.h"
#include "ui/message_center/views/notification_control_button_factory.h"
#include "ui/message_center/views/notification_control_buttons_view.h"
#include "ui/message_center/views/notification_header_view.h"
#include "ui/message_center/views/notification_view_base.h"
#include "ui/message_center/views/notification_view_util.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_host.h"
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/background.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/layout/box_layout.h"
namespace message_center {
namespace {
constexpr auto kContentRowPadding = …;
constexpr gfx::Size kIconViewSize(36, 36);
constexpr auto kLeftContentPadding = …;
constexpr auto kLeftContentPaddingWithIcon = …;
constexpr gfx::Size kActionButtonMinSize(0, 32);
constexpr int kMessageLabelWidthWithIcon = …;
constexpr int kMessageLabelWidth = …;
constexpr auto kLargeImageContainerPadding = …;
constexpr int kMaxLinesForTitleView = …;
constexpr int kTitleCharacterLimit = …;
constexpr int kHeaderTextFontSize = …;
constexpr auto kTextViewPaddingDefault = …;
constexpr auto kSettingsRowPadding = …;
constexpr auto kSettingsRadioButtonPadding = …;
constexpr gfx::Insets kSettingsButtonRowPadding(8);
gfx::FontList GetHeaderTextFontList() { … }
gfx::Insets CalculateTopPadding(int font_list_height) { … }
class NotificationTextButton : public views::MdTextButton { … };
BEGIN_METADATA(…)
class InlineSettingsRadioButton : public views::RadioButton { … };
BEGIN_METADATA(…)
class NotificationInkDropImpl : public views::InkDropImpl { … };
}
class NotificationView::NotificationViewPathGenerator
: public views::HighlightPathGenerator { … };
NotificationView::NotificationView(
const message_center::Notification& notification)
: … { … }
NotificationView::~NotificationView() { … }
SkColor NotificationView::GetActionButtonColorForTesting(
views::LabelButton* action_button) { … }
void NotificationView::CreateOrUpdateHeaderView(
const Notification& notification) { … }
void NotificationView::CreateOrUpdateTitleView(
const Notification& notification) { … }
void NotificationView::CreateOrUpdateSmallIconView(
const Notification& notification) { … }
void NotificationView::CreateOrUpdateInlineSettingsViews(
const Notification& notification) { … }
void NotificationView::CreateOrUpdateSnoozeSettingsViews(
const Notification& notification) { … }
std::unique_ptr<views::LabelButton>
NotificationView::GenerateNotificationLabelButton(
views::Button::PressedCallback callback,
const std::u16string& label) { … }
void NotificationView::UpdateViewForExpandedState(bool expanded) { … }
gfx::Size NotificationView::GetIconViewSize() const { … }
int NotificationView::GetLargeImageViewMaxWidth() const { … }
void NotificationView::OnThemeChanged() { … }
void NotificationView::UpdateCornerRadius(int top_radius, int bottom_radius) { … }
void NotificationView::ToggleInlineSettings(const ui::Event& event) { … }
void NotificationView::ToggleSnoozeSettings(const ui::Event& event) { … }
bool NotificationView::IsExpandable() const { … }
void NotificationView::AddLayerToRegion(ui::Layer* layer,
views::LayerRegion region) { … }
void NotificationView::RemoveLayerFromRegions(ui::Layer* layer) { … }
void NotificationView::Layout(PassKey) { … }
void NotificationView::PreferredSizeChanged() { … }
void NotificationView::UpdateHeaderViewBackgroundColor() { … }
SkColor NotificationView::GetNotificationHeaderViewBackgroundColor() const { … }
void NotificationView::UpdateActionButtonsRowBackground() { … }
void NotificationView::AddBackgroundAnimation(const ui::Event& event) { … }
void NotificationView::RemoveBackgroundAnimation() { … }
std::vector<views::View*> NotificationView::GetChildrenForLayerAdjustment() { … }
void NotificationView::HeaderRowPressed() { … }
BEGIN_METADATA(…)
}