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

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: comments and test 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
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Called when the console message is reported. 104 // Called when the console message is reported.
105 virtual void reportConsoleMessage(int source, int level, const WebString& me ssage, int lineNumber, const WebString& sourceURL) { } 105 virtual void reportConsoleMessage(int source, int level, const WebString& me ssage, int lineNumber, const WebString& sourceURL) { }
106 106
107 // Inspector related messages. 107 // Inspector related messages.
108 virtual void dispatchDevToolsMessage(const WebString&) { } 108 virtual void dispatchDevToolsMessage(const WebString&) { }
109 virtual void saveDevToolsAgentState(const WebString&) { } 109 virtual void saveDevToolsAgentState(const WebString&) { }
110 110
111 // ServiceWorker specific method. 111 // ServiceWorker specific method.
112 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult result) { } 112 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult result) { }
113 113
114 // ServiceWorker specific method. Called after InstallEvent (dispatched
115 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
116 // script context.
117 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent Result result) { }
118
119 // ServiceWorker specific methods. Called after FetchEvent is handled by the 114 // ServiceWorker specific methods. Called after FetchEvent is handled by the
120 // ServiceWorker's script context. When no response is provided, the browser 115 // ServiceWorker's script context. When no response is provided, the browser
121 // should fallback to native fetch. 116 // should fallback to native fetch.
122 virtual void didHandleFetchEvent(int fetchEventID) { } 117 virtual void didHandleFetchEvent(int fetchEventID) { }
123 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { } 118 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { }
124 119
120 // ServiceWorker specific method. Called after InstallEvent (dispatched
121 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
122 // script context.
123 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent Result result) { }
124
125 // ServiceWorker specific method. Called after NotificationClickEvent and
126 // NotificationErrorEvent (dispatched via WebServiceWorkerContextProxy) are
127 // handled by the ServiceWorker's script context.
128 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv entResult result) { }
129 virtual void didHandleNotificationErrorEvent(int eventID, WebServiceWorkerEv entResult result) { }
130
125 // ServiceWorker specific method. Called after PushEvent (dispatched via 131 // ServiceWorker specific method. Called after PushEvent (dispatched via
126 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script 132 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
127 // context. 133 // context.
128 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult result) { } 134 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult result) { }
129 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
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698