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

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

Issue 1220223003: [Background Sync] Add sync registration details to onsync event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix: Missing words in comment 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 | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('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 25 matching lines...) Expand all
36 #include "public/platform/modules/navigator_services/WebServicePortCallbacks.h" 36 #include "public/platform/modules/navigator_services/WebServicePortCallbacks.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 struct WebCircularGeofencingRegion; 40 struct WebCircularGeofencingRegion;
41 struct WebCrossOriginServiceWorkerClient; 41 struct WebCrossOriginServiceWorkerClient;
42 struct WebNotificationData; 42 struct WebNotificationData;
43 class WebServiceWorkerRegistration; 43 class WebServiceWorkerRegistration;
44 class WebServiceWorkerRequest; 44 class WebServiceWorkerRequest;
45 class WebString; 45 class WebString;
46 struct WebSyncRegistration;
46 47
47 // A proxy interface to talk to the worker's GlobalScope implementation. 48 // A proxy interface to talk to the worker's GlobalScope implementation.
48 // All methods of this class must be called on the worker thread. 49 // All methods of this class must be called on the worker thread.
49 class WebServiceWorkerContextProxy { 50 class WebServiceWorkerContextProxy {
50 public: 51 public:
51 virtual ~WebServiceWorkerContextProxy() { } 52 virtual ~WebServiceWorkerContextProxy() { }
52 53
53 virtual void setRegistration(WebServiceWorkerRegistration*) = 0; 54 virtual void setRegistration(WebServiceWorkerRegistration*) = 0;
54 virtual void dispatchActivateEvent(int eventID) = 0; 55 virtual void dispatchActivateEvent(int eventID) = 0;
55 // FIXME: This needs to pass the active service worker info. 56 // FIXME: This needs to pass the active service worker info.
56 virtual void dispatchInstallEvent(int installEventID) = 0; 57 virtual void dispatchInstallEvent(int installEventID) = 0;
57 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0; 58 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0;
58 59
59 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0; 60 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0;
60 61
61 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0; 62 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray& channels) = 0;
62 63
63 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0; 64 virtual void dispatchNotificationClickEvent(int eventID, int64_t notificatio nID, const WebNotificationData&) = 0;
64 65
65 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0; 66 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0;
66 67
67 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0; 68 virtual void dispatchCrossOriginConnectEvent(int eventID, const WebCrossOrig inServiceWorkerClient&) = 0;
68 69
69 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0; 70 virtual void dispatchCrossOriginMessageEvent(const WebCrossOriginServiceWork erClient&, const WebString& message, const WebMessagePortChannelArray&) = 0;
70 71
71 // Passes ownership of the callbacks. 72 // Passes ownership of the callbacks.
72 virtual void dispatchServicePortConnectEvent(WebServicePortConnectEventCallb acks*, const WebURL& targetURL, const WebString& origin, WebServicePortID) = 0; 73 virtual void dispatchServicePortConnectEvent(WebServicePortConnectEventCallb acks*, const WebURL& targetURL, const WebString& origin, WebServicePortID) = 0;
73 74
74 // Once the ServiceWorker has finished handling the sync event 75 // Once the ServiceWorker has finished handling the sync event,
75 // didHandleSyncEvent is called on the context client. 76 // didHandleSyncEvent is called on the context client.
77 // TODO(iclelland): Remove the single-parameter version once all call sites
78 // have been updated.
76 virtual void dispatchSyncEvent(int syncEventID) = 0; 79 virtual void dispatchSyncEvent(int syncEventID) = 0;
80 virtual void dispatchSyncEvent(int syncEventID, const WebSyncRegistration&) = 0;
77 81
78 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0; 82 virtual void addStashedMessagePorts(const WebMessagePortChannelArray& channe ls, const WebVector<WebString>& channelNames) = 0;
79 }; 83 };
80 84
81 } // namespace blink 85 } // namespace blink
82 86
83 #endif // WebServiceWorkerContextProxy_h 87 #endif // WebServiceWorkerContextProxy_h
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698