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

Side by Side Diff: public/web/WebServiceWorkerContextProxy.h

Issue 1210633002: Update navigator.services API to use the new services.onconnect event [1/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@serviceport-part3
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « public/platform/modules/navigator_services/WebServicePortProvider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebServiceWorkerContextProxy_h 31 #ifndef WebServiceWorkerContextProxy_h
32 #define WebServiceWorkerContextProxy_h 32 #define WebServiceWorkerContextProxy_h
33 33
34 #include "public/platform/WebGeofencingEventType.h" 34 #include "public/platform/WebGeofencingEventType.h"
35 #include "public/platform/WebMessagePortChannel.h" 35 #include "public/platform/WebMessagePortChannel.h"
36 #include "public/platform/modules/navigator_services/WebServicePortCallbacks.h"
36 37
37 namespace blink { 38 namespace blink {
38 39
39 struct WebCircularGeofencingRegion; 40 struct WebCircularGeofencingRegion;
40 struct WebCrossOriginServiceWorkerClient; 41 struct WebCrossOriginServiceWorkerClient;
41 struct WebNotificationData; 42 struct WebNotificationData;
42 class WebServiceWorkerRegistration; 43 class WebServiceWorkerRegistration;
43 class WebServiceWorkerRequest; 44 class WebServiceWorkerRequest;
44 class WebString; 45 class WebString;
45 46
(...skipping 14 matching lines...) Expand all
60 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0; 61 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0;
61 62
62 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0; 63 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0;
63 64
64 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0; 65 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0;
65 66
66 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0; 67 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0;
67 68
68 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0; 69 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0;
69 70
71 // Passes ownership of the callbacks.
72 virtual void dispatchServicePortConnectEvent(WebServicePortConnectEventCallb acks*, const WebURL& targetURL, const WebString& origin, WebServicePortID) = 0;
73
70 // Once the ServiceWorker has finished handling the sync event 74 // Once the ServiceWorker has finished handling the sync event
71 // didHandleSyncEvent is called on the context client. 75 // didHandleSyncEvent is called on the context client.
72 virtual void dispatchSyncEvent(int syncEventID) = 0; 76 virtual void dispatchSyncEvent(int syncEventID) = 0;
73 77
74 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0; 78 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0;
75 }; 79 };
76 80
77 } // namespace blink 81 } // namespace blink
78 82
79 #endif // WebServiceWorkerContextProxy_h 83 #endif // WebServiceWorkerContextProxy_h
OLDNEW
« no previous file with comments | « public/platform/modules/navigator_services/WebServicePortProvider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698