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

Issue 11958025: Start delegating notifications to MessageCenter on Windows. (Closed)

Created:
7 years, 11 months ago by Dmitry Titov
Modified:
7 years, 11 months ago
CC:
chromium-reviews, Aaron Boodman, sadrul, chromium-apps-reviews_chromium.org, ben+watch_chromium.org
Visibility:
Public.

Description

Start delegating notifications to MessageCenter on Windows. This is the next step. MessageCeneterNotificationManager now creates MessageCenter and forwards new notificaitons to it. 1. Upon chat with dewittj@, we decided to not trat MessageCenter as Singleton since there are issues on process shutdown (MessageCenter should exist while MessageCeneterNotificationManager does). Changes that. 2. MessageCeneterNotificationManager for now keeps a map of all displayed Notification objects - to make sure NotificationDelegates are invoked and Profiles are tracked. 3. Started to pass ExtensionId into as origin_id from Notification API, to scope the notification updates to a specific app (bug 168924) 4. Additionally scoped update of notifications by profile, since in multiprofile case the update was also not scoped by profile. This does not yet render anything, since there is no rendering Observer set for the MessageCenter. Will coordinate with Justin. Next step would be to land a test for the add/update/remove logic, and also move image download from Balloon_view_ash to NotificationUIManagerImpl, where notifications wait until they are ready to be displayed. BUG=168924, 168605 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178352

Patch Set 1 #

Total comments: 1

Patch Set 2 : moved MessageCenter to ash::Shell #

Total comments: 4

Patch Set 3 : Made MessageCenterNotificationManager to pull MessageCenter from right places. #

Patch Set 4 : fix mac build #

Patch Set 5 : fix androif build #

Total comments: 2

Patch Set 6 : another mac fix #

Patch Set 7 : another compile fix #

Patch Set 8 : another compile fix #

Total comments: 11

Patch Set 9 : cr feedback #

Patch Set 10 : fix compile error #

Patch Set 11 : moved MessageCenter retrieval code #

Patch Set 12 : added USE_ASH guard to test code as well #

Total comments: 6

Patch Set 13 : sky cr feedback #

Total comments: 1

Patch Set 14 : call through to ash::Shell #

Patch Set 15 : rebase #

Patch Set 16 : fix cromeos build #

Patch Set 17 : another build fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+351 lines, -54 lines) Patch
M ash/shell.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -3 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -0 lines 0 comments Download
M ash/system/web_notification/web_notification_tray.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ash/system/web_notification/web_notification_tray.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/browser_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +32 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/notification/notification_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/balloon_notification_ui_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/balloon_notification_ui_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +61 lines, -5 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +159 lines, -11 lines 0 comments Download
M chrome/browser/notifications/notification.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/notifications/notification.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification_ui_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager_impl.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager_impl.cc View 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/test/base/testing_browser_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +20 lines, -0 lines 0 comments Download
M ui/message_center/message_center.h View 2 chunks +1 line, -5 lines 0 comments Download
M ui/message_center/message_center.cc View 2 chunks +3 lines, -9 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Dmitry Titov
Next step to MessageCeneter on Windows. I run this code in the debugger but it ...
7 years, 11 months ago (2013-01-17 01:28:56 UTC) #1
stevenjb
Only looked at web_notification_tray so far, but wanted to give you a heads up on ...
7 years, 11 months ago (2013-01-17 01:53:44 UTC) #2
Dmitry Titov
On 2013/01/17 01:53:44, stevenjb (chromium) wrote: > ash/system/web_notification/web_notification_tray.cc:86: > message_center_.reset(new message_center::MessageCenter); > This is a ...
7 years, 11 months ago (2013-01-17 03:04:29 UTC) #3
dewittj
Looks good to me. https://codereview.chromium.org/11958025/diff/4001/chrome/browser/notifications/message_center_notification_manager.h File chrome/browser/notifications/message_center_notification_manager.h (right): https://codereview.chromium.org/11958025/diff/4001/chrome/browser/notifications/message_center_notification_manager.h#newcode64 chrome/browser/notifications/message_center_notification_manager.h:64: // ProfileNotification and NotificaitonList::Notification) into ...
7 years, 11 months ago (2013-01-17 17:41:21 UTC) #4
Dmitry Titov
Thinking a bit more about Steven's note, I realized it's better to make MessageCenter to ...
7 years, 11 months ago (2013-01-17 22:47:44 UTC) #5
Dmitry Titov
https://codereview.chromium.org/11958025/diff/4001/chrome/browser/notifications/message_center_notification_manager.h File chrome/browser/notifications/message_center_notification_manager.h (right): https://codereview.chromium.org/11958025/diff/4001/chrome/browser/notifications/message_center_notification_manager.h#newcode64 chrome/browser/notifications/message_center_notification_manager.h:64: // ProfileNotification and NotificaitonList::Notification) into a single class. On ...
7 years, 11 months ago (2013-01-17 23:05:42 UTC) #6
Dmitry Titov
PTAL. Now pulling shared instance of MessageCenter from ash::Shell or g_browser_process, depending on USE_ASH.
7 years, 11 months ago (2013-01-17 23:07:02 UTC) #7
dewittj
lgtm. https://codereview.chromium.org/11958025/diff/15002/chrome/browser/notifications/message_center_notification_manager.h File chrome/browser/notifications/message_center_notification_manager.h (right): https://codereview.chromium.org/11958025/diff/15002/chrome/browser/notifications/message_center_notification_manager.h#newcode64 chrome/browser/notifications/message_center_notification_manager.h:64: // ProfileNotification and NotificaitonList::Notification) into a single class. ...
7 years, 11 months ago (2013-01-18 00:45:44 UTC) #8
Dmitry Titov
Fixed typos, thanks Justin! Also fixed couple more build errors on systems where ENABLE_MESSAGE_CENTER is ...
7 years, 11 months ago (2013-01-18 01:43:24 UTC) #9
stevenjb
https://codereview.chromium.org/11958025/diff/28002/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11958025/diff/28002/chrome/browser/browser_process_impl.cc#newcode451 chrome/browser/browser_process_impl.cc:451: #ifdef ENABLE_MESSAGE_CENTER Shouldn't we add && !USE_ASH here, otherwise ...
7 years, 11 months ago (2013-01-18 19:56:18 UTC) #10
Dmitry Titov
Thanks Steven! https://codereview.chromium.org/11958025/diff/28002/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/11958025/diff/28002/chrome/browser/browser_process_impl.cc#newcode451 chrome/browser/browser_process_impl.cc:451: #ifdef ENABLE_MESSAGE_CENTER On 2013/01/18 19:56:19, stevenjb (chromium) ...
7 years, 11 months ago (2013-01-18 21:23:00 UTC) #11
stevenjb
lgtm https://codereview.chromium.org/11958025/diff/28002/chrome/browser/notifications/message_center_notification_manager.cc File chrome/browser/notifications/message_center_notification_manager.cc (right): https://codereview.chromium.org/11958025/diff/28002/chrome/browser/notifications/message_center_notification_manager.cc#newcode28 chrome/browser/notifications/message_center_notification_manager.cc:28: #endif I see. So MessageCenter is owned by ...
7 years, 11 months ago (2013-01-18 22:50:04 UTC) #12
Dmitry Titov
> I think it might be a little clearer to me to have this logic ...
7 years, 11 months ago (2013-01-18 23:15:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dimich@chromium.org/11958025/20018
7 years, 11 months ago (2013-01-18 23:18:33 UTC) #14
commit-bot: I haz the power
Presubmit check for 11958025-20018 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 11 months ago (2013-01-18 23:18:48 UTC) #15
Dmitry Titov
Could you guys please take a look for owners bit? chrome/browser, ash : sky chrome/test ...
7 years, 11 months ago (2013-01-18 23:28:21 UTC) #16
Paweł Hajdan Jr.
chrome/test LGTM
7 years, 11 months ago (2013-01-18 23:44:00 UTC) #17
sky
https://codereview.chromium.org/11958025/diff/22044/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/11958025/diff/22044/chrome/browser/browser_process.h#newcode120 chrome/browser/browser_process.h:120: virtual message_center::MessageCenter* message_center() = 0; Should this be in ...
7 years, 11 months ago (2013-01-22 19:29:00 UTC) #18
Dmitry Titov
https://codereview.chromium.org/11958025/diff/22044/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/11958025/diff/22044/chrome/browser/browser_process.h#newcode120 chrome/browser/browser_process.h:120: virtual message_center::MessageCenter* message_center() = 0; On 2013/01/22 19:29:00, sky ...
7 years, 11 months ago (2013-01-22 21:01:07 UTC) #19
sky
https://codereview.chromium.org/11958025/diff/39003/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/11958025/diff/39003/chrome/browser/browser_process.h#newcode58 chrome/browser/browser_process.h:58: #if defined(ENABLE_MESSAGE_CENTER) && !defined(USE_ASH) Why do we need the ...
7 years, 11 months ago (2013-01-22 21:46:39 UTC) #20
Dmitry Titov
ENABLE_MESSAGE_CENTER is enabled on ash as well. This is a new implementation of notification_ui_manager which ...
7 years, 11 months ago (2013-01-22 22:09:24 UTC) #21
Dmitry Titov
To summarize previous post: ENABLE_MESSAGE_CENTER USE_ASH 0 0 Current Mac and Linux - do not ...
7 years, 11 months ago (2013-01-22 23:09:41 UTC) #22
sky
What is the long term goal? Can't we have it live in BrowserProcess so we ...
7 years, 11 months ago (2013-01-22 23:59:14 UTC) #23
Dmitry Titov
The long-term goal is to remove ENABLE_MESSAGE_CENTER once we get MessageCenter-based notifications implemented across platforms ...
7 years, 11 months ago (2013-01-23 00:15:11 UTC) #24
sky
Can't the BrowserProcess implementation call through to the shell? That way no ifdef in browser_process.h ...
7 years, 11 months ago (2013-01-23 01:19:31 UTC) #25
Dmitry Titov
On 2013/01/23 01:19:31, sky wrote: > Can't the BrowserProcess implementation call through to the shell? ...
7 years, 11 months ago (2013-01-23 02:09:58 UTC) #26
sky
LGTM - thanks
7 years, 11 months ago (2013-01-23 16:12:08 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dimich@chromium.org/11958025/42004
7 years, 11 months ago (2013-01-23 16:35:47 UTC) #28
commit-bot: I haz the power
7 years, 11 months ago (2013-01-23 19:40:15 UTC) #29
Message was sent while issue was closed.
Change committed as 178352

Powered by Google App Engine
This is Rietveld 408576698