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

Unified Diff: Source/modules/navigatorconnect/AcceptConnectionObserver.h

Issue 1205783004: Update navigator.services API to use the new services.onconnect event [3/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@serviceport-serviceside
Patch Set: remove extra space Created 5 years, 5 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/navigatorconnect/AcceptConnectionObserver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/navigatorconnect/AcceptConnectionObserver.h
diff --git a/Source/modules/navigatorconnect/AcceptConnectionObserver.h b/Source/modules/navigatorconnect/AcceptConnectionObserver.h
index fa4bd393a4f2b75385d52e2e582320c24c4c1e97..a92326705674f9aa56f55472899648cddb483679 100644
--- a/Source/modules/navigatorconnect/AcceptConnectionObserver.h
+++ b/Source/modules/navigatorconnect/AcceptConnectionObserver.h
@@ -20,13 +20,12 @@ class ScriptPromise;
class ScriptState;
class ScriptValue;
-// This class observes the service worker's handling of a CrossOriginConnectEvent
-// and notified the client of the result. Created for each instance of
-// CrossOriginConnectEvent.
+// This class observes the service worker's handling of a ServicePortConnectEvent
+// and notifies the client of the result. Created for each instance of
+// ServicePortConnectEvent.
class MODULES_EXPORT AcceptConnectionObserver final : public GarbageCollectedFinalized<AcceptConnectionObserver>, public ContextLifecycleObserver {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AcceptConnectionObserver);
public:
- static AcceptConnectionObserver* create(ExecutionContext*, int eventID);
static AcceptConnectionObserver* create(ServicePortCollection*, PassOwnPtr<WebServicePortConnectEventCallbacks>, WebServicePortID, const KURL& targetURL);
void contextDestroyed() override;
@@ -35,10 +34,6 @@ public:
// be rejected if no call to acceptConnection or respondWith was made.
void didDispatchEvent();
- // Observes the promise and delays calling didHandleCrossOriginConnectEvent()
- // until the given promise is resolved or rejected.
- void acceptConnection(ScriptState*, ScriptPromise, ExceptionState&);
-
// Observes the promise and delays calling didHandleServicePortConnectEvent()
// until the given promise is resolved or rejected. Returns a promise that
// resolves to a ServicePort when the connection is accepted.
@@ -52,10 +47,8 @@ public:
private:
class ThenFunction;
- AcceptConnectionObserver(ExecutionContext*, int eventID);
AcceptConnectionObserver(ServicePortCollection*, PassOwnPtr<WebServicePortConnectEventCallbacks>, WebServicePortID, const KURL& targetURL);
- int m_eventID;
OwnPtr<WebServicePortConnectEventCallbacks> m_callbacks;
Member<ServicePortCollection> m_collection;
WebServicePortID m_portID;
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/navigatorconnect/AcceptConnectionObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698