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

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

Issue 285403002: Push API: define push event on Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Define PushEvent with data attribute. Created 6 years, 7 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // ServiceWorker's script context. When no response is provided, the browser 103 // ServiceWorker's script context. When no response is provided, the browser
104 // should fallback to native fetch. 104 // should fallback to native fetch.
105 virtual void didHandleFetchEvent(int fetchEventID) { } 105 virtual void didHandleFetchEvent(int fetchEventID) { }
106 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { } 106 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { }
107 107
108 // ServiceWorker specific method. Called after SyncEvent (dispatched via 108 // ServiceWorker specific method. Called after SyncEvent (dispatched via
109 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script 109 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
110 // context. 110 // context.
111 virtual void didHandleSyncEvent(int syncEventID) { } 111 virtual void didHandleSyncEvent(int syncEventID) { }
112 112
113 // ServiceWorker specific method. Called after PushEvent (dispatched via
114 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
115 // context.
116 virtual void didHandlePushEvent(int eventID) { }
117
113 // Ownership of the returned object is transferred to the caller. 118 // Ownership of the returned object is transferred to the caller.
114 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( blink::WebDataSource*) { return 0; } 119 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( blink::WebDataSource*) { return 0; }
115 120
116 // Ownership of the passed callbacks is transferred to the callee, callee 121 // Ownership of the passed callbacks is transferred to the callee, callee
117 // should delete the callbacks after calling either onSuccess or onError. 122 // should delete the callbacks after calling either onSuccess or onError.
118 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are 123 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are
119 // passed to the WebServiceWorkerClientsCallbacks implementation. 124 // passed to the WebServiceWorkerClientsCallbacks implementation.
120 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } 125 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); }
121 126
122 // Callee receives ownership of the passed vector. 127 // Callee receives ownership of the passed vector.
123 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 128 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
124 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } 129 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
125 }; 130 };
126 131
127 } // namespace blink 132 } // namespace blink
128 133
129 #endif // WebWorkerContextClient_h 134 #endif // WebWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698