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

Unified Diff: Source/modules/push_messaging/PushManager.cpp

Issue 793913002: Stub implementation for PushRegistration.unregister(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mvan_6
Patch Set: remove trace 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/push_messaging/PushRegistration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushManager.cpp
diff --git a/Source/modules/push_messaging/PushManager.cpp b/Source/modules/push_messaging/PushManager.cpp
index 90fb36608521d68388f5d449cc8e41025337c9e4..805f4c11124eff6887cd41dace3a2c91c6169a2a 100644
--- a/Source/modules/push_messaging/PushManager.cpp
+++ b/Source/modules/push_messaging/PushManager.cpp
@@ -17,6 +17,7 @@
#include "modules/push_messaging/PushError.h"
#include "modules/push_messaging/PushPermissionStatusCallback.h"
#include "modules/push_messaging/PushRegistration.h"
+#include "modules/push_messaging/PushRegistrationCallbacks.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "public/platform/Platform.h"
#include "public/platform/WebPushClient.h"
@@ -57,9 +58,9 @@ ScriptPromise PushManager::registerPushMessaging(ScriptState* scriptState)
// FIXME: add test coverage for this condition - https://crbug.com/440431
if (!document->domWindow() || !document->frame())
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "Document is detached from window."));
- PushController::clientFrom(document->frame()).registerPushMessaging(m_registration->webRegistration(), new CallbackPromiseAdapter<PushRegistration, PushError>(resolver));
+ PushController::clientFrom(document->frame()).registerPushMessaging(m_registration->webRegistration(), new PushRegistrationCallbacks(resolver, m_registration));
} else {
- pushProvider()->registerPushMessaging(m_registration->webRegistration(), new CallbackPromiseAdapter<PushRegistration, PushError>(resolver));
+ pushProvider()->registerPushMessaging(m_registration->webRegistration(), new PushRegistrationCallbacks(resolver, m_registration));
}
return promise;
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/push_messaging/PushRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698