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

Unified Diff: content/renderer/notification_provider.cc

Issue 433433002: Remove code for the old Web Notification permission-path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: content/renderer/notification_provider.cc
diff --git a/content/renderer/notification_provider.cc b/content/renderer/notification_provider.cc
index 69f5b07f04ebbf05c703eb006d18e8454f682e25..0a578fb3146ee9241316acc80628f2e3cff18f97 100644
--- a/content/renderer/notification_provider.cc
+++ b/content/renderer/notification_provider.cc
@@ -11,13 +11,11 @@
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h"
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
using blink::WebDocument;
using blink::WebNotification;
using blink::WebNotificationPresenter;
-using blink::WebNotificationPermissionCallback;
using blink::WebSecurityOrigin;
using blink::WebString;
using blink::WebURL;
@@ -25,7 +23,6 @@ using blink::WebUserGestureIndicator;
namespace content {
-
NotificationProvider::NotificationProvider(RenderFrame* render_frame)
: RenderFrameObserver(render_frame) {
}
@@ -75,15 +72,6 @@ WebNotificationPresenter::Permission NotificationProvider::checkPermission(
return static_cast<WebNotificationPresenter::Permission>(permission);
}
-void NotificationProvider::requestPermission(
- const WebSecurityOrigin& origin,
- WebNotificationPermissionCallback* callback) {
- int id = manager_.RegisterPermissionRequest(callback);
-
- Send(new DesktopNotificationHostMsg_RequestPermission(
- routing_id(), GURL(origin.toString()), id));
-}
-
bool NotificationProvider::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NotificationProvider, message)
@@ -91,8 +79,6 @@ bool NotificationProvider::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(DesktopNotificationMsg_PostError, OnError);
IPC_MESSAGE_HANDLER(DesktopNotificationMsg_PostClose, OnClose);
IPC_MESSAGE_HANDLER(DesktopNotificationMsg_PostClick, OnClick);
- IPC_MESSAGE_HANDLER(DesktopNotificationMsg_PermissionRequestDone,
- OnPermissionRequestComplete);
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -140,13 +126,6 @@ void NotificationProvider::OnClick(int id) {
notification.dispatchClickEvent();
}
-void NotificationProvider::OnPermissionRequestComplete(int id) {
- WebNotificationPermissionCallback* callback = manager_.GetCallback(id);
- DCHECK(callback);
- callback->permissionRequestComplete();
- manager_.OnPermissionRequestComplete(id);
-}
-
void NotificationProvider::OnNavigate() {
manager_.Clear();
}
« no previous file with comments | « content/renderer/notification_provider.h ('k') | content/shell/renderer/test_runner/notification_presenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698