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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 115 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
116 // script context. | 116 // script context. |
117 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result result) { } | 117 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result result) { } |
118 | 118 |
119 // ServiceWorker specific methods. Called after FetchEvent is handled by the | 119 // ServiceWorker specific methods. Called after FetchEvent is handled by the |
120 // ServiceWorker's script context. When no response is provided, the browser | 120 // ServiceWorker's script context. When no response is provided, the browser |
121 // should fallback to native fetch. | 121 // should fallback to native fetch. |
122 virtual void didHandleFetchEvent(int fetchEventID) { } | 122 virtual void didHandleFetchEvent(int fetchEventID) { } |
123 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes
ponse& response) { } | 123 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes
ponse& response) { } |
124 | 124 |
| 125 // ServiceWorker specific method. Called after PushEvent (dispatched via |
| 126 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script |
| 127 // context. |
| 128 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult
result) { } |
| 129 |
125 // ServiceWorker specific method. Called after SyncEvent (dispatched via | 130 // ServiceWorker specific method. Called after SyncEvent (dispatched via |
126 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script | 131 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script |
127 // context. | 132 // context. |
128 virtual void didHandleSyncEvent(int syncEventID) { } | 133 virtual void didHandleSyncEvent(int syncEventID) { } |
129 | 134 |
130 // Ownership of the returned object is transferred to the caller. | 135 // Ownership of the returned object is transferred to the caller. |
131 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(
WebDataSource*) { return 0; } | 136 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(
WebDataSource*) { return 0; } |
132 | 137 |
133 // Ownership of the passed callbacks is transferred to the callee, callee | 138 // Ownership of the passed callbacks is transferred to the callee, callee |
134 // should delete the callbacks after calling either onSuccess or onError. | 139 // should delete the callbacks after calling either onSuccess or onError. |
135 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are | 140 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are |
136 // passed to the WebServiceWorkerClientsCallbacks implementation. | 141 // passed to the WebServiceWorkerClientsCallbacks implementation. |
137 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } | 142 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } |
138 | 143 |
139 // Callee receives ownership of the passed vector. | 144 // Callee receives ownership of the passed vector. |
140 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175
3 | 145 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175
3 |
141 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP
ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } | 146 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP
ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } |
142 }; | 147 }; |
143 | 148 |
144 } // namespace blink | 149 } // namespace blink |
145 | 150 |
146 #endif // WebServiceWorkerContextClient_h | 151 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |