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

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: 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 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();
}
}
« 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