Chromium Code Reviews| 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 6b509af46658bbb0e0655e22c1ff144704dc6f35..c14d52122f7723dc59ae2b10a12596c53d96bb08 100644 |
| --- a/ui/arc/notification/arc_custom_notification_view.cc |
| +++ b/ui/arc/notification/arc_custom_notification_view.cc |
| @@ -158,6 +158,28 @@ 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_; |
|
yoshiki
2017/03/07 14:59:29
nit: Could you add DISALLOW_COPY_AND_ASSIGN(Contro
yhanada
2017/03/08 00:27:00
Done.
|
| +}; |
| + |
| class ArcCustomNotificationView::ContentViewDelegate |
| : public message_center::CustomNotificationContentViewDelegate { |
| public: |
| @@ -190,26 +212,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), |
| @@ -537,6 +539,7 @@ void ArcCustomNotificationView::ButtonPressed(views::Button* sender, |
| ->OnCloseButtonPressed(); |
| } |
| if (item_ && settings_button_ && sender == settings_button_) { |
| + settings_button_->HideInkDrop(); |
| item_->OpenSettings(); |
| } |
| } |