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

Issue 369573004: Separate the logic of popup alignment and workarea handling as delegate. (Closed)

Created:
6 years, 5 months ago by Jun Mukai
Modified:
6 years, 5 months ago
CC:
chromium-reviews, kalyank, sadrul, ben+ash_chromium.org, tfarina
Project:
chromium
Visibility:
Public.

Description

Separate the logic of popup alignment and workarea handling as delegate. MessagePopupCollection contains plenty size of conditions and ifdefs to work properly with each type of the desktop we have, and some logic makes side effects on another desktop. This design is unhealty and adding more conditions sounds incorrect. Considering this, it would be better to extract platform dependent parts as a delegate class (PopupAlignmentDelegate) and allow subclasses to provide platform-specific features. This design is also beneficial for win-ash, because we had OS_CHROMEOS layout data and logic which actually means Ash. BUG=389656 R=stevenjb@chromium.org, dimich@chromium.org TBR=jamescook@chromium.org, harrym@chromium.org TEST=message_center_unittests, ash_unittests, some manual checks Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282269

Patch Set 1 #

Patch Set 2 : polish #

Total comments: 24

Patch Set 3 : fix #

Patch Set 4 : fix #

Patch Set 5 : fix compiler warning for win #

Patch Set 6 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+860 lines, -408 lines) Patch
M ash/ash.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M ash/shelf/shelf_layout_manager.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
A ash/system/web_notification/ash_popup_alignment_delegate.h View 1 2 1 chunk +93 lines, -0 lines 0 comments Download
A ash/system/web_notification/ash_popup_alignment_delegate.cc View 1 2 1 chunk +176 lines, -0 lines 0 comments Download
A ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc View 1 2 1 chunk +197 lines, -0 lines 0 comments Download
M ash/system/web_notification/web_notification_tray.h View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M ash/system/web_notification/web_notification_tray.cc View 1 2 4 chunks +8 lines, -135 lines 0 comments Download
M ash/system/web_notification/web_notification_tray_unittest.cc View 1 2 3 8 chunks +44 lines, -52 lines 0 comments Download
M chrome/browser/ui/views/message_center/web_notification_tray.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/message_center/web_notification_tray.cc View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M ui/message_center/message_center.gyp View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
A ui/message_center/views/desktop_popup_alignment_delegate.h View 1 chunk +66 lines, -0 lines 0 comments Download
A ui/message_center/views/desktop_popup_alignment_delegate.cc View 1 2 3 4 1 chunk +104 lines, -0 lines 0 comments Download
M ui/message_center/views/message_popup_collection.h View 9 chunks +8 lines, -51 lines 0 comments Download
M ui/message_center/views/message_popup_collection.cc View 10 chunks +27 lines, -135 lines 0 comments Download
M ui/message_center/views/message_popup_collection_unittest.cc View 12 chunks +36 lines, -26 lines 0 comments Download
A ui/message_center/views/popup_alignment_delegate.h View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A ui/message_center/views/popup_alignment_delegate.cc View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M ui/message_center/views/toast_contents_view.cc View 2 chunks +2 lines, -5 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Jun Mukai
6 years, 5 months ago (2014-07-02 21:11:40 UTC) #1
stevenjb
Nice. Mostly nits. https://codereview.chromium.org/369573004/diff/20001/ash/system/web_notification/popup_alignment_delegate.cc File ash/system/web_notification/popup_alignment_delegate.cc (right): https://codereview.chromium.org/369573004/diff/20001/ash/system/web_notification/popup_alignment_delegate.cc#newcode36 ash/system/web_notification/popup_alignment_delegate.cc:36: screen_(NULL), root_window_(NULL) https://codereview.chromium.org/369573004/diff/20001/ash/system/web_notification/popup_alignment_delegate.cc#newcode47 ash/system/web_notification/popup_alignment_delegate.cc:47: shelf_ = ...
6 years, 5 months ago (2014-07-02 21:59:24 UTC) #2
Jun Mukai
https://codereview.chromium.org/369573004/diff/20001/ash/system/web_notification/popup_alignment_delegate.cc File ash/system/web_notification/popup_alignment_delegate.cc (right): https://codereview.chromium.org/369573004/diff/20001/ash/system/web_notification/popup_alignment_delegate.cc#newcode36 ash/system/web_notification/popup_alignment_delegate.cc:36: screen_(NULL), On 2014/07/02 21:59:23, stevenjb wrote: > root_window_(NULL) Done. ...
6 years, 5 months ago (2014-07-07 18:12:36 UTC) #3
stevenjb
lgtm
6 years, 5 months ago (2014-07-07 18:37:45 UTC) #4
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 5 months ago (2014-07-07 18:47:19 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/369573004/40001
6 years, 5 months ago (2014-07-07 18:47:55 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 5 months ago (2014-07-07 22:16:55 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-07 22:22:00 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/78318)
6 years, 5 months ago (2014-07-07 22:22:01 UTC) #9
Jun Mukai
oops, add some TBRs: jamescook for ash/ash.gyp (adding new files) harrym for ash/shelf/shelf_layout_manager.h (adding new ...
6 years, 5 months ago (2014-07-07 22:28:46 UTC) #10
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 5 months ago (2014-07-07 22:28:52 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/369573004/40001
6 years, 5 months ago (2014-07-07 22:30:25 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 5 months ago (2014-07-07 23:57:43 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-08 00:11:53 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/35761)
6 years, 5 months ago (2014-07-08 00:11:54 UTC) #15
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 5 months ago (2014-07-08 18:37:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/369573004/60001
6 years, 5 months ago (2014-07-08 18:40:33 UTC) #17
Dmitry Titov
Sorry for late, but LGTM!
6 years, 5 months ago (2014-07-08 18:59:06 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-08 21:46:18 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-08 21:57:16 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win8_chromium_rel/builds/2188)
6 years, 5 months ago (2014-07-08 21:57:17 UTC) #21
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 5 months ago (2014-07-08 22:18:15 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/369573004/80001
6 years, 5 months ago (2014-07-08 22:19:58 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 5 months ago (2014-07-09 02:07:00 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-09 03:12:01 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/builds/49657)
6 years, 5 months ago (2014-07-09 03:12:02 UTC) #26
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 5 months ago (2014-07-09 23:17:56 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/369573004/100001
6 years, 5 months ago (2014-07-09 23:21:17 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-10 03:00:53 UTC) #29
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 07:40:56 UTC) #30
Message was sent while issue was closed.
Change committed as 282269

Powered by Google App Engine
This is Rietveld 408576698