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

Side by Side Diff: Source/modules/navigatorconnect/CrossOriginConnectEvent.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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CrossOriginConnectEvent_h
6 #define CrossOriginConnectEvent_h
7
8 #include "modules/EventModules.h"
9 #include "modules/ModulesExport.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class AcceptConnectionObserver;
15 class CrossOriginServiceWorkerClient;
16
17 // A crossoriginconnect event is dispatched by the client to a service worker's
18 // script. AcceptConnectionObserver can be used to notify the client about the
19 // service worker's response.
20 class MODULES_EXPORT CrossOriginConnectEvent final : public Event {
21 DEFINE_WRAPPERTYPEINFO();
22 public:
23 static PassRefPtrWillBeRawPtr<CrossOriginConnectEvent> create();
24 static PassRefPtrWillBeRawPtr<CrossOriginConnectEvent> create(AcceptConnecti onObserver*, CrossOriginServiceWorkerClient*);
25
26 CrossOriginServiceWorkerClient* client() const;
27
28 void acceptConnection(ScriptState*, const ScriptPromise&, ExceptionState&);
29
30 const AtomicString& interfaceName() const override;
31
32 DECLARE_VIRTUAL_TRACE();
33
34 protected:
35 CrossOriginConnectEvent();
36 CrossOriginConnectEvent(AcceptConnectionObserver*, CrossOriginServiceWorkerC lient*);
37
38 private:
39 PersistentWillBeMember<AcceptConnectionObserver> m_observer;
40 PersistentWillBeMember<CrossOriginServiceWorkerClient> m_client;
41 };
42
43 } // namespace blink
44
45 #endif // CrossOriginConnectEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698