Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2734153002: Remove ink drop effect after clicking the settings button on an ARC notification. (Closed)
Patch Set: address the comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2cb0496e0d1bcbdb23f6d7b8cffd686d5c732beb..a494efba28e6dfa1d236fda160d408f1f633a02c 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),
@@ -540,6 +544,7 @@ void ArcCustomNotificationView::ButtonPressed(views::Button* sender,
->OnCloseButtonPressed();
}
if (item_ && settings_button_ && sender == settings_button_) {
+ settings_button_->HideInkDrop();
item_->OpenSettings();
}
}
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698