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

Issue 2033093003: [Notification] Make HTML5 Notification use ActionCenter on Windows 10, behind Flags.

Created:
4 years, 6 months ago by huangs
Modified:
3 years, 7 months ago
Reviewers:
Peter Beverloo, chrisha
CC:
chromium-reviews, mlamouri+watch-notifications_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Notification] Make HTML5 Notification use ActionCenter on Windows 10, behind Flags. Notes: - This CL only considers HTML5 Notifications, not Rich Notifications in Chrome Extensions. - Targetted for Windows 10 2016/07 update AKA Anniversary Update. - Feature is behind flags: --enable-features=NativeNotifications - Resurrecting deleted metro_driver code for this: https://src.chromium.org/svn/trunk/src/win8/metro_driver/ (Temporary) Test instructions: - Server testing/notification/index.html on local server, e.g.: cd testing/notification python -m SimpleHTTPServer - Run Chrome: chrome.exe --enable-features=NativeNotifications --user-data-dir=C:\temp_delete_me_after - Navigate to test page (http://localhost:8000). Message boxes are displayed for debugging. BUG=516147

Patch Set 1 #

Total comments: 19

Patch Set 2 : Figured out how to use ToastTemplateType_ToastImageAndText02. #

Patch Set 3 : Refactor COM code into helper class; made flow defensive against failures. #

Patch Set 4 : Added the temp file dance to display icon. #

Patch Set 5 : Fix temp image deletion flow; split NotificationToastHelperWin to own file. #

Patch Set 6 : Add LoadXmlFromString() and *test* code to allow injection of arbitrary XML from JS. #

Patch Set 7 : Remove <image> tag if none specified; handle events {click, close}. #

Patch Set 8 : Sync. #

Patch Set 9 : Resize and center icon on worker thread. #

Patch Set 10 : Messy non-working code to experiment with onLaunched(). #

Patch Set 11 : Experimental change to chrome.exe. #

Patch Set 12 : Sync and merge. #

Patch Set 13 : Sync and merge; change to use MS Win32 sample code -- not working yet. #

Patch Set 14 : Sync and merge. #

Patch Set 15 : Hacky experiment that piped notification click back to Chrome. #

Patch Set 16 : Remove some dead code. #

Patch Set 17 : Sync and merge. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1591 lines, -3 lines) Patch
M chrome/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -0 lines 0 comments Download
A chrome/app/chrome_exe_main_app_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/app/chrome_exe_main_app_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +315 lines, -0 lines 0 comments Download
M chrome/app/chrome_exe_main_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 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 16 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_display_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +13 lines, -1 line 0 comments Download
A chrome/browser/notifications/notification_platform_bridge_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +121 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_platform_bridge_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +468 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_toast_helper_win.h View 1 2 3 4 5 6 1 chunk +151 lines, -0 lines 0 comments Download
A chrome/browser/notifications/notification_toast_helper_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +321 lines, -0 lines 0 comments Download
M chrome/common/features.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
A testing/notification/index.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +158 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
huangs
Not ready for review yet, but want to keep you updated on progress. TODO: - ...
4 years, 6 months ago (2016-06-02 20:31:59 UTC) #2
chrisha
https://codereview.chromium.org/2033093003/diff/1/chrome/browser/notifications/notification_platform_bridge_win.cc File chrome/browser/notifications/notification_platform_bridge_win.cc (right): https://codereview.chromium.org/2033093003/diff/1/chrome/browser/notifications/notification_platform_bridge_win.cc#newcode56 chrome/browser/notifications/notification_platform_bridge_win.cc:56: void CheckHR(HRESULT hr, const char* message = nullptr) { ...
4 years, 6 months ago (2016-06-02 21:14:10 UTC) #3
huangs
Updates: - I'm trying to replace ToastTemplateType_ToastText02 with ToastTemplateType_ToastTexAndImaget02 but something breaks; have to figure ...
4 years, 6 months ago (2016-06-06 04:51:57 UTC) #4
Peter Beverloo
This is really exciting to see, thanks :) I didn't review your CL in great ...
4 years, 6 months ago (2016-06-07 15:48:29 UTC) #5
Peter Beverloo
Also, feel free to iterate on this in-tree if you prefer, that'll allow the patches ...
4 years, 6 months ago (2016-06-07 15:50:59 UTC) #6
huangs
Quick update (will pore through comments after): - The Windows-specific code is mostly copied from ...
4 years, 6 months ago (2016-06-07 21:59:53 UTC) #7
huangs
Figured out images: Turns out if <image> tag has src="" then weird things happen to ...
4 years, 6 months ago (2016-06-07 23:27:47 UTC) #8
huangs
Updated snapshot and addressed *some* comments. The remaining I'll still need to deal with. Not ...
4 years, 6 months ago (2016-06-08 22:12:14 UTC) #9
huangs
Update: - Can display custom images now! Looks a bit off though (tiny and not ...
4 years, 6 months ago (2016-06-14 01:12:35 UTC) #10
huangs
We can clicking/closing events of the toast can propagate to JS! Caveats: - For Windows ...
4 years, 6 months ago (2016-06-21 22:33:59 UTC) #11
huangs
3 years, 8 months ago (2017-04-03 18:11:14 UTC) #14
Status:
- We can handle images: Have code to fetch, resize, copy-to-temp, and cleanup.
- Main challenge now: Respond to events, without making Chrome UWP.
  - Info suggested by robliao@:
https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/10/16/quickstart-handl...
  - http://crbug.com/516147#c57 suggests we look at how Opera does this:
https://github.com/operasoftware/desktop/tree/master/lgpl/sources

Powered by Google App Engine
This is Rietveld 408576698