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

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

Issue 2756653002: Remove ink drop effect after clicking the settings button on an ARC notification. (Closed)
Patch Set: 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 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();
}
}
« 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