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

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

Issue 210833004: Inform the client when the Service Worker rejects an install event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Called when the WorkerGlobalScope had an error or an exception. 73 // Called when the WorkerGlobalScope had an error or an exception.
74 virtual void reportException(const WebString& errorMessage, int lineNumber, int columnNumber, const WebString& sourceURL) { } 74 virtual void reportException(const WebString& errorMessage, int lineNumber, int columnNumber, const WebString& sourceURL) { }
75 75
76 // Inspector related messages. 76 // Inspector related messages.
77 virtual void dispatchDevToolsMessage(const WebString&) { } 77 virtual void dispatchDevToolsMessage(const WebString&) { }
78 virtual void saveDevToolsAgentState(const WebString&) { } 78 virtual void saveDevToolsAgentState(const WebString&) { }
79 79
80 // ServiceWorker specific method. Called after InstallEvent (dispatched 80 // ServiceWorker specific method. Called after InstallEvent (dispatched
81 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's 81 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
82 // script context. 82 // script context. |rejected| is true if the event handler passed a promise
83 virtual void didHandleInstallEvent(int installEventID) { } 83 // to waitUntil() that rejected.
84 virtual void didHandleInstallEvent(int installEventID, bool rejected) { }
kinuko 2014/03/25 11:26:51 If you're going to make yet another blink patch (w
falken 2014/03/26 07:26:36 Thanks for the idea. Taking this approach now.
84 85
85 // ServiceWorker specific methods. Called after FetchEvent is handled by the 86 // ServiceWorker specific methods. Called after FetchEvent is handled by the
86 // ServiceWorker's script context. When no response is provided, the browser 87 // ServiceWorker's script context. When no response is provided, the browser
87 // should fallback to native fetch. 88 // should fallback to native fetch.
88 virtual void didHandleFetchEvent(int fetchEventID) { } 89 virtual void didHandleFetchEvent(int fetchEventID) { }
89 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { } 90 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { }
90 91
91 // Ownership of the returned object is transferred to the caller. 92 // Ownership of the returned object is transferred to the caller.
92 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( blink::WebDataSource*) { return 0; } 93 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( blink::WebDataSource*) { return 0; }
93 }; 94 };
94 95
95 } // namespace blink 96 } // namespace blink
96 97
97 #endif // WebWorkerContextClient_h 98 #endif // WebWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698