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

Issue 2873553002: [Notifications] Fix swipe to close for ARC notifications. (Closed)

Created:
3 years, 7 months ago by Eliot Courtney
Modified:
3 years, 7 months ago
CC:
chromium-reviews, Peter Beverloo, mlamouri+watch-notifications_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Notifications] Fix swipe to close for ARC notifications. Change ArcCustomNotificationView::EventForwarder to not directly invoke On*Event methods of ArcCustomNotificationView (which then call up to the parent). Instead, re-dispatch them to the containing widget, which should handle the event propagation, letting SlideOutController get events as it should. A consequence of this is that I had to add a delegate method to SlideOutController to update ArcCustomNotificationView::SlideHelper. This is because ArcCustomNotificationView will no longer get the gesture events, since it is no longer being called directly from EventForwarder. BUG=719407 Review-Url: https://codereview.chromium.org/2873553002 Cr-Commit-Position: refs/heads/master@{#473094} Committed: https://chromium.googlesource.com/chromium/src/+/870290f623b47e436d231e354c84b8723bb7000a

Patch Set 1 #

Total comments: 2

Patch Set 2 : Change EventForwarder to re-dispatch events through the containing Widget #

Patch Set 3 : remove line #

Total comments: 2

Patch Set 4 : Address comments. #

Total comments: 6

Patch Set 5 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -47 lines) Patch
M ui/arc/notification/arc_custom_notification_view.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M ui/arc/notification/arc_custom_notification_view.cc View 1 2 3 4 3 chunks +29 lines, -44 lines 0 comments Download
M ui/message_center/views/custom_notification_content_view_delegate.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/views/custom_notification_view.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M ui/message_center/views/custom_notification_view.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ui/message_center/views/custom_notification_view_unittest.cc View 1 5 chunks +99 lines, -0 lines 0 comments Download
M ui/message_center/views/message_view.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/views/message_view.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/message_center/views/slide_out_controller.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/message_center/views/slide_out_controller.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (18 generated)
Eliot Courtney
PTAL, thanks~!
3 years, 7 months ago (2017-05-09 04:17:49 UTC) #4
yoshiki
LGTM https://codereview.chromium.org/2873553002/diff/1/ui/message_center/views/slide_out_controller.h File ui/message_center/views/slide_out_controller.h (right): https://codereview.chromium.org/2873553002/diff/1/ui/message_center/views/slide_out_controller.h#newcode18 ui/message_center/views/slide_out_controller.h:18: class SlideOutController : public ui::EventHandler, nit: we do ...
3 years, 7 months ago (2017-05-09 05:45:23 UTC) #5
Evan Stade
https://codereview.chromium.org/2873553002/diff/1/ui/message_center/views/slide_out_controller.h File ui/message_center/views/slide_out_controller.h (left): https://codereview.chromium.org/2873553002/diff/1/ui/message_center/views/slide_out_controller.h#oldcode10 ui/message_center/views/slide_out_controller.h:10: #include "ui/events/scoped_target_handler.h" nit: this include isn't needed any more. ...
3 years, 7 months ago (2017-05-09 14:47:14 UTC) #8
Evan Stade
+sky for his input as this is not really how I designed slide out controller ...
3 years, 7 months ago (2017-05-09 15:03:21 UTC) #10
sky
On 2017/05/09 15:03:21, Evan Stade wrote: > +sky for his input as this is not ...
3 years, 7 months ago (2017-05-09 17:30:49 UTC) #11
yoshiki
On 2017/05/09 17:30:49, sky wrote: > On 2017/05/09 15:03:21, Evan Stade wrote: > > +sky ...
3 years, 7 months ago (2017-05-11 00:47:17 UTC) #12
yoshiki
https://codereview.chromium.org/2873553002/diff/40001/ui/arc/notification/arc_custom_notification_view.cc File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2873553002/diff/40001/ui/arc/notification/arc_custom_notification_view.cc#newcode94 ui/arc/notification/arc_custom_notification_view.cc:94: widget->OnKeyEvent(event->AsKeyEvent()); Is this necessary? I think key events are ...
3 years, 7 months ago (2017-05-16 08:09:12 UTC) #17
Eliot Courtney
I talked with Oshima-san and Yoshiki-san, who both helped me a lot. We think it ...
3 years, 7 months ago (2017-05-16 09:15:54 UTC) #20
xiyuan
lgtm Another perspective that we could consider (for longer term) is to figure out a ...
3 years, 7 months ago (2017-05-16 16:27:58 UTC) #23
Evan Stade
https://codereview.chromium.org/2873553002/diff/60001/ui/message_center/views/slide_out_controller.cc File ui/message_center/views/slide_out_controller.cc (right): https://codereview.chromium.org/2873553002/diff/60001/ui/message_center/views/slide_out_controller.cc#newcode75 ui/message_center/views/slide_out_controller.cc:75: delegate_->OnSlideChanged(); Can the interested party (ArcCustomNotificationView) observe animations on ...
3 years, 7 months ago (2017-05-16 21:58:15 UTC) #24
oshima
On 2017/05/16 16:27:58, xiyuan wrote: > lgtm > > Another perspective that we could consider ...
3 years, 7 months ago (2017-05-17 01:49:22 UTC) #25
Eliot Courtney
Thanks everyone for their advice~! I'm going to try out, for now, getting SlideOutController to ...
3 years, 7 months ago (2017-05-17 04:48:25 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2873553002/80001
3 years, 7 months ago (2017-05-19 04:22:39 UTC) #29
commit-bot: I haz the power
3 years, 7 months ago (2017-05-19 05:15:32 UTC) #32
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/870290f623b47e436d231e354c84...

Powered by Google App Engine
This is Rietveld 408576698