| Index: ui/arc/notification/arc_custom_notification_view.cc
|
| diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
|
| index 2700045797adafc37400c7964f4ec5fb365cee47..d44009340e761e2c9703c2e89d52f45b0ca7b87c 100644
|
| --- a/ui/arc/notification/arc_custom_notification_view.cc
|
| +++ b/ui/arc/notification/arc_custom_notification_view.cc
|
| @@ -158,6 +158,30 @@ class ArcCustomNotificationView::SlideHelper
|
| DISALLOW_COPY_AND_ASSIGN(SlideHelper);
|
| };
|
|
|
| +class ArcCustomNotificationView::ControlButton
|
| + : public message_center::PaddedButton {
|
| + public:
|
| + explicit ControlButton(ArcCustomNotificationView* owner)
|
| + : message_center::PaddedButton(owner), owner_(owner) {}
|
| +
|
| + void OnFocus() override {
|
| + message_center::PaddedButton::OnFocus();
|
| + owner_->UpdateControlButtonsVisibility();
|
| + }
|
| +
|
| + void OnBlur() override {
|
| + message_center::PaddedButton::OnBlur();
|
| + owner_->UpdateControlButtonsVisibility();
|
| + }
|
| +
|
| + void HideInkDrop() { AnimateInkDrop(views::InkDropState::HIDDEN, nullptr); }
|
| +
|
| + private:
|
| + ArcCustomNotificationView* const owner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ControlButton);
|
| +};
|
| +
|
| class ArcCustomNotificationView::ContentViewDelegate
|
| : public message_center::CustomNotificationContentViewDelegate {
|
| public:
|
| @@ -190,26 +214,6 @@ class ArcCustomNotificationView::ContentViewDelegate
|
| DISALLOW_COPY_AND_ASSIGN(ContentViewDelegate);
|
| };
|
|
|
| -class ArcCustomNotificationView::ControlButton
|
| - : public message_center::PaddedButton {
|
| - public:
|
| - explicit ControlButton(ArcCustomNotificationView* owner)
|
| - : message_center::PaddedButton(owner), owner_(owner) {}
|
| -
|
| - void OnFocus() override {
|
| - message_center::PaddedButton::OnFocus();
|
| - owner_->UpdateControlButtonsVisibility();
|
| - }
|
| -
|
| - void OnBlur() override {
|
| - message_center::PaddedButton::OnBlur();
|
| - owner_->UpdateControlButtonsVisibility();
|
| - }
|
| -
|
| - private:
|
| - ArcCustomNotificationView* const owner_;
|
| -};
|
| -
|
| ArcCustomNotificationView::ArcCustomNotificationView(
|
| ArcCustomNotificationItem* item)
|
| : item_(item),
|
| @@ -531,6 +535,7 @@ void ArcCustomNotificationView::ButtonPressed(views::Button* sender,
|
| item_->CloseFromCloseButton();
|
| }
|
| if (item_ && settings_button_ && sender == settings_button_) {
|
| + settings_button_->HideInkDrop();
|
| item_->OpenSettings();
|
| }
|
| }
|
|
|