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

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

Issue 180843003: Start to implement FetchEvent for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 19 matching lines...) Expand all
30 30
31 #ifndef WebServiceWorkerContextClient_h 31 #ifndef WebServiceWorkerContextClient_h
32 #define WebServiceWorkerContextClient_h 32 #define WebServiceWorkerContextClient_h
33 33
34 #include "WebWorkerPermissionClientProxy.h" 34 #include "WebWorkerPermissionClientProxy.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class WebString; 38 class WebString;
39 class WebServiceWorkerContextProxy; 39 class WebServiceWorkerContextProxy;
40 struct WebServiceWorkerFetchResponse;
40 41
41 // This interface is implemented by the client. It is suppoed to be created 42 // This interface is implemented by the client. It is suppoed to be created
42 // on the main thread and then passed on to the worker thread to be owned 43 // on the main thread and then passed on to the worker thread to be owned
43 // by a newly created WorkerGlobalScope. All methods of this class, except 44 // by a newly created WorkerGlobalScope. All methods of this class, except
44 // for workerContextFailedToStart(), are called on the worker thread. 45 // for workerContextFailedToStart(), are called on the worker thread.
45 // FIXME: Split this into EmbeddedWorkerContextClient and 46 // FIXME: Split this into EmbeddedWorkerContextClient and
46 // ServiceWorkerScriptContextClient when we decide to use EmbeddedWorker 47 // ServiceWorkerScriptContextClient when we decide to use EmbeddedWorker
47 // framework for other implementation (like SharedWorker). 48 // framework for other implementation (like SharedWorker).
48 class WebServiceWorkerContextClient { 49 class WebServiceWorkerContextClient {
49 public: 50 public:
(...skipping 20 matching lines...) Expand all
70 virtual void reportException(const WebString& errorMessage, int lineNumber, int columnNumber, const WebString& sourceURL) { } 71 virtual void reportException(const WebString& errorMessage, int lineNumber, int columnNumber, const WebString& sourceURL) { }
71 72
72 // Inspector related messages. 73 // Inspector related messages.
73 virtual void dispatchDevToolsMessage(const WebString&) { } 74 virtual void dispatchDevToolsMessage(const WebString&) { }
74 virtual void saveDevToolsAgentState(const WebString&) { } 75 virtual void saveDevToolsAgentState(const WebString&) { }
75 76
76 // ServiceWorker specific method. Called after InstallEvent (dispatched 77 // ServiceWorker specific method. Called after InstallEvent (dispatched
77 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's 78 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
78 // script context. 79 // script context.
79 virtual void didHandleInstallEvent(int installEventID) { } 80 virtual void didHandleInstallEvent(int installEventID) { }
81
82 // ServiceWorker specific method. Called after FetchEvent is handled by the
83 // ServiceWorker's script context.
84 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerFet chResponse& response) { }
80 }; 85 };
81 86
82 } // namespace blink 87 } // namespace blink
83 88
84 #endif // WebWorkerContextClient_h 89 #endif // WebWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698