|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by yoshiki Modified:
3 years, 9 months ago CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, Peter Beverloo, mlamouri+watch-notifications_chromium.org, lhchavez+watch_chromium.org, hidehiko+watch_chromium.org, awdf+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionNot Remove Non-Closable Arc Popup When Close Button is Pressed
* Fixes the issue: crbug.com/689220
- Adds ArcNotificationDelegate::Close method to handle the closing event
- Not calls ArcCustomNotificationItem::Close() when the close button is pressed
* Refines the code
- Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification
BUG=689220
Review-Url: https://codereview.chromium.org/2668583005
Cr-Commit-Position: refs/heads/master@{#454814}
Committed: https://chromium.googlesource.com/chromium/src/+/9739ee62037118f47be3dab9701164c428b02e5b
Patch Set 1 #
Total comments: 3
Patch Set 2 #
Total comments: 4
Patch Set 3 : Fix the CHECK location #Patch Set 4 : rebase #
Total comments: 4
Patch Set 5 : Addressed comment #
Messages
Total messages: 51 (40 generated)
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Description was changed from ========== wip . BUG= ========== to ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refine the code - Calling the same method MessageView::OnCloseButtonPressed() both from custom and normal notification. BUG=689220 ==========
yoshiki@chromium.org changed reviewers: + dewittj@chromium.org
Description was changed from ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refine the code - Calling the same method MessageView::OnCloseButtonPressed() both from custom and normal notification. BUG=689220 ========== to ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refine the code - Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification BUG=689220 ==========
Justin, PTAL. Thanks. https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... File ui/arc/notification/arc_custom_notification_item.cc (left): https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_item.cc:111: // Needs to manually remove notification from MessageCenter because This comment was wrong. We didn't need to call "Close(true)" if we handled ArcNotificationDelegate::Close() correctly.
https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:509: parent_->OnCloseButtonPressed(); any reason you didn't just use views::View::parent()? If it's about casting, I'd like to see a DCHECK(parent_ == parent()) so that any hierarchy mistakes are apparent.
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Justin, Sorry for late, PTAL. https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2668583005/diff/40001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:509: parent_->OnCloseButtonPressed(); On 2017/02/07 00:03:11, dewittj (OOO 2.20-2.24) wrote: > any reason you didn't just use views::View::parent()? If it's about casting, > I'd like to see a DCHECK(parent_ == parent()) so that any hierarchy mistakes are > apparent. Thanks. I changed the code with using parent(). PTAL again?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refine the code - Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification BUG=689220 ========== to ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refines the code - Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification BUG=689220 ==========
https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:492: CHECK_EQ(message_center::CustomNotificationView::kViewClassName, Unclear to me whether this should be CHECK or DCHECK. I guess check would prevent possible security bugs if this were ever wrong.. Do we have unit tests that cause OnBlur and ButtonPressed to be called on ArcCustomNotificationViews? With these CHECKs in place we need them so that crashes are detected before they reach a stable channel. https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:501: CHECK_EQ(message_center::CustomNotificationView::kViewClassName, this doesn't seem to be relevant here?
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Justin, PTAL. Thanks. https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... File ui/arc/notification/arc_custom_notification_view.cc (right): https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:492: CHECK_EQ(message_center::CustomNotificationView::kViewClassName, On 2017/02/28 21:38:48, dewittj wrote: > Unclear to me whether this should be CHECK or DCHECK. I guess check would > prevent possible security bugs if this were ever wrong.. Do we have unit tests > that cause OnBlur and ButtonPressed to be called on ArcCustomNotificationViews? > With these CHECKs in place we need them so that crashes are detected before they > reach a stable channel. I'm adding a test, which checks CHECK for ButtonPressed, in a separated patch. And I'll add tests for OnFocus and OnBlue. https://codereview.chromium.org/2723143002/ Can I submit this patch without tests? https://codereview.chromium.org/2668583005/diff/60001/ui/arc/notification/arc... ui/arc/notification/arc_custom_notification_view.cc:501: CHECK_EQ(message_center::CustomNotificationView::kViewClassName, On 2017/02/28 21:38:48, dewittj wrote: > this doesn't seem to be relevant here? Good catch. This should be in OnFocus() instead of here.
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
xiyuan@chromium.org changed reviewers: + xiyuan@chromium.org
drive-by https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... File ui/arc/notification/arc_custom_notification_view.h (right): https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... ui/arc/notification/arc_custom_notification_view.h:38: ArcCustomNotificationView(ArcCustomNotificationItem* item); "explicit" is required for single arg constructor per style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... ui/arc/notification/arc_custom_notification_view.h:90: ArcCustomNotificationItem* item_; nit: Why do we need to change this? It would be useful if the constructor is changed later and forget to initialize this.
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yoshiki@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #6 (id:140001) has been deleted
https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... File ui/arc/notification/arc_custom_notification_view.h (right): https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... ui/arc/notification/arc_custom_notification_view.h:38: ArcCustomNotificationView(ArcCustomNotificationItem* item); On 2017/03/02 20:39:51, xiyuan wrote: > "explicit" is required for single arg constructor per style guide. > > https://google.github.io/styleguide/cppguide.html#Implicit_Conversions Done. https://codereview.chromium.org/2668583005/diff/100001/ui/arc/notification/ar... ui/arc/notification/arc_custom_notification_view.h:90: ArcCustomNotificationItem* item_; On 2017/03/02 20:39:51, xiyuan wrote: > nit: Why do we need to change this? It would be useful if the constructor is > changed later and forget to initialize this. Oops, you're right. Reverted.
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm Thanks for writing the tests in another cl.
lgtm
The CQ bit was checked by yoshiki@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1488764629158950,
"parent_rev": "037f99733dfc7a5465e0ac7dc39f3711dc4090d7", "commit_rev":
"9739ee62037118f47be3dab9701164c428b02e5b"}
Message was sent while issue was closed.
Description was changed from ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refines the code - Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification BUG=689220 ========== to ========== Not Remove Non-Closable Arc Popup When Close Button is Pressed * Fixes the issue: crbug.com/689220 - Adds ArcNotificationDelegate::Close method to handle the closing event - Not calls ArcCustomNotificationItem::Close() when the close button is pressed * Refines the code - Uses the same method MessageView::OnCloseButtonPressed() both from custom and normal notification BUG=689220 Review-Url: https://codereview.chromium.org/2668583005 Cr-Commit-Position: refs/heads/master@{#454814} Committed: https://chromium.googlesource.com/chromium/src/+/9739ee62037118f47be3dab97011... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as https://chromium.googlesource.com/chromium/src/+/9739ee62037118f47be3dab97011... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
