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

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

Issue 720873002: Expose the notificationclick and notificationerror events on ServiceWorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 125 // ServiceWorker specific method. Called after PushEvent (dispatched via
126 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script 126 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
127 // context. 127 // context.
128 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult result) { } 128 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult result) { }
129 129
130 // ServiceWorker specific method. Called after NotificationClickEvent and
131 // NotificationErrorEvent (dispatched via WebServiceWorkerContextProxy) are
132 // handled by the ServiceWorker's script context.
133 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv entResult result) { }
134 virtual void didHandleNotificationErrorEvent(int eventID, WebServiceWorkerEv entResult result) { }
135
130 // ServiceWorker specific method. Called after SyncEvent (dispatched via 136 // ServiceWorker specific method. Called after SyncEvent (dispatched via
131 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script 137 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
132 // context. 138 // context.
133 virtual void didHandleSyncEvent(int syncEventID) { } 139 virtual void didHandleSyncEvent(int syncEventID) { }
134 140
135 // Ownership of the returned object is transferred to the caller. 141 // Ownership of the returned object is transferred to the caller.
136 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return 0; } 142 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return 0; }
137 143
138 // Ownership of the passed callbacks is transferred to the callee, callee 144 // Ownership of the passed callbacks is transferred to the callee, callee
139 // should delete the callbacks after calling either onSuccess or onError. 145 // should delete the callbacks after calling either onSuccess or onError.
140 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are 146 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are
141 // passed to the WebServiceWorkerClientsCallbacks implementation. 147 // passed to the WebServiceWorkerClientsCallbacks implementation.
142 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } 148 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); }
143 149
144 // Callee receives ownership of the passed vector. 150 // Callee receives ownership of the passed vector.
145 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 151 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
146 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } 152 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
147 }; 153 };
148 154
149 } // namespace blink 155 } // namespace blink
150 156
151 #endif // WebServiceWorkerContextClient_h 157 #endif // WebServiceWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698