OLD | NEW |
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 19 matching lines...) Expand all Loading... |
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 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 struct WebCircularGeofencingRegion; | 39 struct WebCircularGeofencingRegion; |
| 40 struct WebNotificationData; |
40 class WebServiceWorkerRequest; | 41 class WebServiceWorkerRequest; |
41 class WebString; | 42 class WebString; |
42 | 43 |
43 // A proxy interface to talk to the worker's GlobalScope implementation. | 44 // A proxy interface to talk to the worker's GlobalScope implementation. |
44 // All methods of this class must be called on the worker thread. | 45 // All methods of this class must be called on the worker thread. |
45 class WebServiceWorkerContextProxy { | 46 class WebServiceWorkerContextProxy { |
46 public: | 47 public: |
47 virtual ~WebServiceWorkerContextProxy() { } | 48 virtual ~WebServiceWorkerContextProxy() { } |
48 | 49 |
49 virtual void dispatchActivateEvent(int eventID) = 0; | 50 virtual void dispatchActivateEvent(int eventID) = 0; |
50 // FIXME: This needs to pass the active service worker info. | 51 // FIXME: This needs to pass the active service worker info. |
51 virtual void dispatchInstallEvent(int installEventID) = 0; | 52 virtual void dispatchInstallEvent(int installEventID) = 0; |
52 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ
est& webRequest) = 0; | 53 virtual void dispatchFetchEvent(int fetchEventID, const WebServiceWorkerRequ
est& webRequest) = 0; |
53 | 54 |
54 virtual void dispatchGeofencingEvent(int eventId, WebGeofencingEventType, co
nst WebString& regionId, const WebCircularGeofencingRegion&) = 0; | 55 virtual void dispatchGeofencingEvent(int eventId, WebGeofencingEventType, co
nst WebString& regionId, const WebCircularGeofencingRegion&) = 0; |
55 | 56 |
56 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray& channels) = 0; | 57 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray& channels) = 0; |
57 | 58 |
| 59 virtual void dispatchNotificationClickEvent(int eventID, const WebNotificati
onData&) = 0; |
| 60 virtual void dispatchNotificationErrorEvent(int eventID, const WebNotificati
onData&) = 0; |
| 61 |
58 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0; | 62 virtual void dispatchPushEvent(int eventID, const WebString& data) = 0; |
59 | 63 |
60 // Once the ServiceWorker has finished handling the sync event | 64 // Once the ServiceWorker has finished handling the sync event |
61 // didHandleSyncEvent is called on the context client. | 65 // didHandleSyncEvent is called on the context client. |
62 virtual void dispatchSyncEvent(int syncEventID) = 0; | 66 virtual void dispatchSyncEvent(int syncEventID) = 0; |
63 }; | 67 }; |
64 | 68 |
65 } // namespace blink | 69 } // namespace blink |
66 | 70 |
67 #endif // WebServiceWorkerContextProxy_h | 71 #endif // WebServiceWorkerContextProxy_h |
OLD | NEW |