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

Issue 794633002: Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. (Closed)

Created:
6 years ago by Peter Beverloo
Modified:
5 years, 11 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, mlamouri+watch-content_chromium.org, tzik, mlamouri+watch-notifications_chromium.org, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, kinuko+serviceworker, peter+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. This patch removes all uses of ShowDesktopNotificationHostMsgParams and replaces it with a more directed PlatformNotificationData. The PlatformNotificationData structure has the same content as the WebNotificationData structure in the Blink API, and included are canonical conversion functions between the two. The reason for this change is two-folded: (1) The content/ layer now has the ability to initialize Web Notification objects, whereas this previously could only be done by Blink. This means that we have to carry all associated data around. The primary user for this are Persistent Notifications, which can outlive the page they were created by (and thereby the JavaScript objects). (2) The Web Notification specification is being updated with new features, a number of which will eventually have to be known to the browser process. This makes future plumbing significantly clearer. Also, the *Desktop*Notification.. name is outdated. BUG=432527 Committed: https://crrev.com/7329c2c1df2c08bf1dd7600731cc37a572181459 Cr-Commit-Position: refs/heads/master@{#308080}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : rebase #

Patch Set 4 : another rebase #

Total comments: 2

Patch Set 5 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -175 lines) Patch
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.h View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 4 chunks +12 lines, -8 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_unittest.cc View 1 2 3 chunks +14 lines, -10 lines 0 comments Download
M content/browser/notifications/notification_event_dispatcher_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/notifications/notification_event_dispatcher_impl.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/notifications/notification_message_filter.h View 2 chunks +9 lines, -3 lines 0 comments Download
M content/browser/notifications/notification_message_filter.cc View 3 chunks +15 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
A content/child/notifications/notification_data_conversions.h View 1 chunk +24 lines, -0 lines 0 comments Download
A content/child/notifications/notification_data_conversions.cc View 1 chunk +48 lines, -0 lines 0 comments Download
A content/child/notifications/notification_data_conversions_unittest.cc View 1 chunk +97 lines, -0 lines 0 comments Download
M content/child/notifications/notification_manager.cc View 3 chunks +19 lines, -27 lines 0 comments Download
M content/common/platform_notification_messages.h View 1 2 3 4 2 chunks +19 lines, -10 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/notification_event_dispatcher.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/platform_notification_service.h View 3 chunks +8 lines, -3 lines 0 comments Download
A content/public/common/platform_notification_data.h View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
A content/public/common/platform_notification_data.cc View 1 chunk +14 lines, -0 lines 0 comments Download
D content/public/common/show_desktop_notification_params.h View 1 chunk +0 lines, -40 lines 0 comments Download
D content/public/common/show_desktop_notification_params.cc View 1 chunk +0 lines, -16 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 2 2 chunks +3 lines, -13 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_notification_manager.h View 1 2 3 3 chunks +11 lines, -5 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_notification_manager.cc View 1 2 3 6 chunks +18 lines, -13 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
Peter Beverloo
+mvanouwerkerk to judge my sanity.
6 years ago (2014-12-10 17:24:51 UTC) #2
Michael van Ouwerkerk
lgtm Holy plumbing batman! https://codereview.chromium.org/794633002/diff/1/content/public/common/platform_notification_data.h File content/public/common/platform_notification_data.h (right): https://codereview.chromium.org/794633002/diff/1/content/public/common/platform_notification_data.h#newcode5 content/public/common/platform_notification_data.h:5: #ifndef CONTENT_PUBLIC_COMMON_PERSISTENT_NOTIFICATION_DATA_H_ Please match the ...
6 years ago (2014-12-10 19:14:07 UTC) #3
Peter Beverloo
+dewittj for notifications +mkwst since I promised to do this Non-plumbing bits are in content/child/notifications/notification_data_conversions*. ...
6 years ago (2014-12-10 19:44:39 UTC) #5
Peter Beverloo
+avi for content API; show_desktop_notification_params.h for platform_notification_data.h swap-out.
6 years ago (2014-12-10 19:46:28 UTC) #7
Avi (use Gerrit)
content/public LGTM
6 years ago (2014-12-10 19:56:39 UTC) #8
dewittj
https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h File chrome/browser/notifications/desktop_notification_service.h (right): https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h#newcode84 chrome/browser/notifications/desktop_notification_service.h:84: const SkBitmap& icon, Is it possible to use gfx::Image ...
6 years ago (2014-12-10 21:57:49 UTC) #9
Peter Beverloo
https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h File chrome/browser/notifications/desktop_notification_service.h (right): https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h#newcode84 chrome/browser/notifications/desktop_notification_service.h:84: const SkBitmap& icon, On 2014/12/10 21:57:49, dewittj wrote: > ...
6 years ago (2014-12-10 22:06:37 UTC) #10
dewittj
On 2014/12/10 22:06:37, Peter Beverloo wrote: > https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h > File chrome/browser/notifications/desktop_notification_service.h (right): > > https://codereview.chromium.org/794633002/diff/20001/chrome/browser/notifications/desktop_notification_service.h#newcode84 ...
6 years ago (2014-12-10 22:13:11 UTC) #11
Peter Beverloo
On 2014/12/10 22:13:11, dewittj wrote: > On 2014/12/10 22:06:37, Peter Beverloo wrote: > > > ...
6 years ago (2014-12-10 22:38:52 UTC) #12
dewittj
ok, needs more design/discussion elsewhere :) lgtm
6 years ago (2014-12-10 22:47:52 UTC) #13
Peter Beverloo
+Tom, mind taking a look to off-load the sick mkwst?
6 years ago (2014-12-11 19:02:45 UTC) #15
Tom Sepez
Messages LGTM with optional nit. https://codereview.chromium.org/794633002/diff/60001/content/public/common/platform_notification_data.h File content/public/common/platform_notification_data.h (right): https://codereview.chromium.org/794633002/diff/60001/content/public/common/platform_notification_data.h#newcode26 content/public/common/platform_notification_data.h:26: }; nit: prefer the ...
6 years ago (2014-12-11 22:12:23 UTC) #16
Peter Beverloo
https://codereview.chromium.org/794633002/diff/60001/content/public/common/platform_notification_data.h File content/public/common/platform_notification_data.h (right): https://codereview.chromium.org/794633002/diff/60001/content/public/common/platform_notification_data.h#newcode26 content/public/common/platform_notification_data.h:26: }; On 2014/12/11 22:12:23, Tom Sepez wrote: > nit: ...
6 years ago (2014-12-12 12:05:56 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794633002/80001
6 years ago (2014-12-12 12:06:49 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-12-12 14:43:08 UTC) #20
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/7329c2c1df2c08bf1dd7600731cc37a572181459 Cr-Commit-Position: refs/heads/master@{#308080}
6 years ago (2014-12-12 14:44:17 UTC) #21
ciqiguopimin
5 years, 11 months ago (2015-01-07 09:01:58 UTC) #22
Message was sent while issue was closed.
On 2014/12/10 19:46:28, Peter Beverloo wrote:
> +avi for content API;
> 
> show_desktop_notification_params.h for platform_notification_data.h swap-out.

really? do you mean the file content_browser_client.h

 // Show a desktop notification. If |cancel_callback| is non-null, it's set to
  // a callback which can be used to cancel the notification.
  virtual void ShowDesktopNotification(
      const ShowDesktopNotificationHostMsgParams& params,
      BrowserContext* browser_context,
      int render_process_id,
      scoped_ptr<DesktopNotificationDelegate> delegate,
      base::Closure* cancel_callback) {}

Powered by Google App Engine
This is Rietveld 408576698