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

Unified Diff: third_party/WebKit/Source/modules/notifications/Notification.cpp

Issue 2244913002: Remove content::NotificationPermissionDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissions_typemaps
Patch Set: Move service connection to NotificationManager. Created 4 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: third_party/WebKit/Source/modules/notifications/Notification.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index 42da08ac1f503960eb58cc9b1236cadb5efc0e63..bd8f999771935b2dfa0c45d14f5a7a110f4b9b79 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -44,17 +44,14 @@
#include "modules/notifications/NotificationData.h"
#include "modules/notifications/NotificationManager.h"
#include "modules/notifications/NotificationOptions.h"
-#include "modules/notifications/NotificationPermissionClient.h"
#include "modules/notifications/NotificationResourcesLoader.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/UserGestureIndicator.h"
#include "public/platform/Platform.h"
#include "public/platform/WebSecurityOrigin.h"
-#include "public/platform/WebString.h"
#include "public/platform/modules/notifications/WebNotificationAction.h"
#include "public/platform/modules/notifications/WebNotificationConstants.h"
#include "public/platform/modules/notifications/WebNotificationManager.h"
-#include "public/platform/modules/permissions/permission_status.mojom-blink.h"
#include "wtf/Assertions.h"
#include "wtf/Functional.h"
@@ -354,14 +351,7 @@ String Notification::permission(ExecutionContext* context)
ScriptPromise Notification::requestPermission(ScriptState* scriptState, NotificationPermissionCallback* deprecatedCallback)
{
- ExecutionContext* context = scriptState->getExecutionContext();
- if (NotificationPermissionClient* permissionClient = NotificationPermissionClient::from(context))
- return permissionClient->requestPermission(scriptState, deprecatedCallback);
-
- // The context has been detached. Return a promise that will never settle.
- DCHECK(context->activeDOMObjectsAreStopped());
Michael van Ouwerkerk 2016/08/16 13:01:10 Is this case handled in the new code?
Reilly Grant (use Gerrit) 2016/08/16 17:46:37 Yes, if the browser-side Mojo service isn't availa
-
- return ScriptPromise();
+ return NotificationManager::from(scriptState->getExecutionContext())->requestPermission(scriptState, deprecatedCallback);
}
size_t Notification::maxActions()

Powered by Google App Engine
This is Rietveld 408576698