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

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

Issue 7125006: Get rid of Chrome notifications dependency, and instead go through ContentBrowserClient to show U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest Created 9 years, 6 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
===================================================================
--- chrome/browser/notifications/desktop_notification_service.cc (revision 88109)
+++ chrome/browser/notifications/desktop_notification_service.cc (working copy)
@@ -37,7 +37,6 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "net/base/escape.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -154,10 +153,8 @@
UMA_HISTOGRAM_COUNTS("NotificationPermissionRequest.Ignored", 1);
RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_);
- if (host) {
- host->Send(new DesktopNotificationMsg_PermissionRequestDone(
- route_id_, callback_context_));
- }
+ if (host)
+ host->DesktopNotificationPermissionRequestDone(callback_context_);
}
gfx::Image* NotificationPermissionInfoBarDelegate::GetIcon() const {
@@ -525,10 +522,8 @@
} else {
// Notify renderer immediately.
RenderViewHost* host = RenderViewHost::FromID(process_id, route_id);
- if (host) {
- host->Send(new DesktopNotificationMsg_PermissionRequestDone(
- route_id, callback_context));
- }
+ if (host)
+ host->DesktopNotificationPermissionRequestDone(callback_context);
}
}
@@ -592,7 +587,8 @@
NotificationService::NoDetails());
}
-int DesktopNotificationService::HasPermission(const GURL& origin) {
+WebKit::WebNotificationPresenter::Permission
+ DesktopNotificationService::HasPermission(const GURL& origin) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return prefs_cache()->HasPermission(origin.GetOrigin());
}

Powered by Google App Engine
This is Rietveld 408576698