Commit 5de2a368 authored by Sara Kato's avatar Sara Kato Committed by Chromium LUCI CQ

views-posse: Add metadata to notification_control_buttons_view

Bug: crbug/1159562
Test: build
Change-Id: Icc582dd5ffe43c94e9d06bf98d4ac470af01ea27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617401Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Sara Kato <sarakato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842907}
parent 338670cb
......@@ -20,12 +20,10 @@
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/background.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/metadata/metadata_impl_macros.h"
namespace message_center {
const char NotificationControlButtonsView::kViewClassName[] =
"NotificationControlButtonsView";
NotificationControlButtonsView::NotificationControlButtonsView(
MessageView* message_view)
: message_view_(message_view), icon_color_(gfx::kChromeIconGrey) {
......@@ -146,10 +144,6 @@ void NotificationControlButtonsView::SetBackgroundColor(SkColor color) {
UpdateButtonIconColors();
}
const char* NotificationControlButtonsView::GetClassName() const {
return kViewClassName;
}
#if BUILDFLAG(IS_CHROMEOS_ASH)
void NotificationControlButtonsView::OnThemeChanged() {
View::OnThemeChanged();
......@@ -184,4 +178,7 @@ SkColor NotificationControlButtonsView::DetermineButtonIconColor() const {
return color_utils::BlendForMinContrast(icon_color_, background_color_).color;
}
BEGIN_METADATA(NotificationControlButtonsView, views::View)
END_METADATA
} // namespace message_center
......@@ -20,10 +20,13 @@ class MessageView;
class MESSAGE_CENTER_EXPORT NotificationControlButtonsView
: public views::View {
public:
// String to be returned by GetClassName() method.
static const char kViewClassName[];
METADATA_HEADER(NotificationControlButtonsView);
explicit NotificationControlButtonsView(MessageView* message_view);
NotificationControlButtonsView(const NotificationControlButtonsView&) =
delete;
NotificationControlButtonsView& operator=(
const NotificationControlButtonsView&) = delete;
~NotificationControlButtonsView() override;
// Change the visibility of the close button. True to show, false to hide.
......@@ -51,8 +54,6 @@ class MESSAGE_CENTER_EXPORT NotificationControlButtonsView
PaddedButton* settings_button() { return settings_button_; }
PaddedButton* snooze_button() { return snooze_button_; }
// views::View
const char* GetClassName() const override;
#if BUILDFLAG(IS_CHROMEOS_ASH)
void OnThemeChanged() override;
#endif
......@@ -75,8 +76,6 @@ class MESSAGE_CENTER_EXPORT NotificationControlButtonsView
SkColor icon_color_;
// The background color for readability of the icons.
SkColor background_color_ = SK_ColorTRANSPARENT;
DISALLOW_COPY_AND_ASSIGN(NotificationControlButtonsView);
};
} // namespace message_center
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment