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

Unified Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 578883003: Remove the strict dependency on WebContents for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb through render_process_id Created 6 years, 2 months 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: chrome/browser/notifications/desktop_notification_service.cc
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index fad44eb4d08637db2d682900097157e443a90a9d..d76bfc65c207d7d39f2827ab66f0d388b611160f 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -27,8 +27,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/desktop_notification_delegate.h"
#include "content/public/browser/notification_service.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/show_desktop_notification_params.h"
@@ -186,7 +184,7 @@ void DesktopNotificationService::RequestNotificationPermission(
void DesktopNotificationService::ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params,
- content::RenderFrameHost* render_frame_host,
+ int render_process_id,
scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -194,7 +192,7 @@ void DesktopNotificationService::ShowDesktopNotification(
NotificationObjectProxy* proxy = new NotificationObjectProxy(delegate.Pass());
base::string16 display_source = DisplayNameForOriginInProcessId(
- origin, render_frame_host->GetProcess()->GetID());
+ origin, render_process_id);
// TODO(peter): Icons for Web Notifications are currently always requested for
// 1x scale, whereas the displays on which they can be displayed can have a
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.h ('k') | chrome/browser/notifications/notification_object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698