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

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: Add MODULES_EXPORT declaration to SyncRegistration 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
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 24 matching lines...) Expand all
35 #include "public/platform/WebMessagePortChannel.h" 35 #include "public/platform/WebMessagePortChannel.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 struct WebCircularGeofencingRegion; 39 struct WebCircularGeofencingRegion;
40 struct WebCrossOriginServiceWorkerClient; 40 struct WebCrossOriginServiceWorkerClient;
41 struct WebNotificationData; 41 struct WebNotificationData;
42 class WebServiceWorkerRegistration; 42 class WebServiceWorkerRegistration;
43 class WebServiceWorkerRequest; 43 class WebServiceWorkerRequest;
44 class WebString; 44 class WebString;
45 struct WebSyncRegistration;
45 46
46 // A proxy interface to talk to the worker's GlobalScope implementation. 47 // A proxy interface to talk to the worker's GlobalScope implementation.
47 // All methods of this class must be called on the worker thread. 48 // All methods of this class must be called on the worker thread.
48 class WebServiceWorkerContextProxy { 49 class WebServiceWorkerContextProxy {
49 public: 50 public:
50 virtual ~WebServiceWorkerContextProxy() { } 51 virtual ~WebServiceWorkerContextProxy() { }
51 52
52 virtual void setRegistration(WebServiceWorkerRegistration*) = 0; 53 virtual void setRegistration(WebServiceWorkerRegistration*) = 0;
53 virtual void dispatchActivateEvent(int eventID) = 0; 54 virtual void dispatchActivateEvent(int eventID) = 0;
54 // FIXME: This needs to pass the active service worker info. 55 // FIXME: This needs to pass the active service worker info.
55 virtual void dispatchInstallEvent(int installEventID) = 0; 56 virtual void dispatchInstallEvent(int installEventID) = 0;
56 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0; 57 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ est& webRequest) = 0;
57 58
58 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0; 59 virtual void dispatchGeofencingEvent(int eventID, WebGeofencingEventType, co nst WebString& regionID, const WebCircularGeofencingRegion&) = 0;
59 60
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
70 // Once the ServiceWorker has finished handling the sync event 71 // Once the ServiceWorker has finished handling the sync event,
71 // didHandleSyncEvent is called on the context client. 72 // didHandleSyncEvent is called on the context client.
73 // FIXME: Remove the single-parameter version once all call sites have been
74 // updated.
72 virtual void dispatchSyncEvent(int syncEventID) = 0; 75 virtual void dispatchSyncEvent(int syncEventID) = 0;
76 virtual void dispatchSyncEvent(int syncEventID, const WebSyncRegistration&) = 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
« Source/web/ServiceWorkerGlobalScopeProxy.h ('K') | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698