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

Unified Diff: content/browser/notifications/notification_message_filter.cc

Issue 794633002: Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/notifications/notification_message_filter.cc
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc
index 3faac0a15dc0949c5bf79d90c0a981af97174521..afbebc9e52672507396303e60fff95e773cec73d 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -74,7 +74,10 @@ void NotificationMessageFilter::OnCheckNotificationPermission(
}
void NotificationMessageFilter::OnShowPlatformNotification(
- int notification_id, const ShowDesktopNotificationHostMsgParams& params) {
+ int notification_id,
+ const GURL& origin,
+ const SkBitmap& icon,
+ const PlatformNotificationData& notification_data) {
scoped_ptr<DesktopNotificationDelegate> delegate(
new PageNotificationDelegate(process_id_, notification_id));
@@ -82,11 +85,13 @@ void NotificationMessageFilter::OnShowPlatformNotification(
GetContentClient()->browser()->GetPlatformNotificationService();
DCHECK(service);
- // TODO(peter): Verify that permission has been granted for params.origin.
+ // TODO(peter): Verify that permission has been granted for |origin|.
base::Closure close_closure;
service->DisplayNotification(browser_context_,
- params,
+ origin,
+ icon,
+ notification_data,
delegate.Pass(),
process_id_,
&close_closure);
@@ -98,18 +103,22 @@ void NotificationMessageFilter::OnShowPlatformNotification(
void NotificationMessageFilter::OnShowPersistentNotification(
int request_id,
int64 service_worker_registration_id,
- const ShowDesktopNotificationHostMsgParams& params) {
+ const GURL& origin,
+ const SkBitmap& icon,
+ const PlatformNotificationData& notification_data) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
PlatformNotificationService* service =
GetContentClient()->browser()->GetPlatformNotificationService();
DCHECK(service);
- // TODO(peter): Verify that permission has been granted for params.origin.
+ // TODO(peter): Verify that permission has been granted for |origin|.
service->DisplayPersistentNotification(browser_context_,
service_worker_registration_id,
- params,
+ origin,
+ icon,
+ notification_data,
process_id_);
Send(new PlatformNotificationMsg_DidShowPersistent(request_id));
« no previous file with comments | « content/browser/notifications/notification_message_filter.h ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698