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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h

Issue 214413004: Dispatch the ServiceWorker "activate" event during activation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Workers, activate! 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 29 matching lines...) Expand all
40 40
41 class ExecutionContext; 41 class ExecutionContext;
42 class Response; 42 class Response;
43 class WorkerClients; 43 class WorkerClients;
44 44
45 class ServiceWorkerGlobalScopeClient : public Supplement<WorkerClients> { 45 class ServiceWorkerGlobalScopeClient : public Supplement<WorkerClients> {
46 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient); 46 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient);
47 public: 47 public:
48 virtual ~ServiceWorkerGlobalScopeClient() { } 48 virtual ~ServiceWorkerGlobalScopeClient() { }
49 49
50 virtual void didHandleActivateEvent(int eventID, blink::WebServiceWorkerEven tResult) = 0;
50 virtual void didHandleInstallEvent(int installEventID, blink::WebServiceWork erEventResult) = 0; 51 virtual void didHandleInstallEvent(int installEventID, blink::WebServiceWork erEventResult) = 0;
51 // A null response means no valid response was provided by the service worke r, so fallback to native. 52 // A null response means no valid response was provided by the service worke r, so fallback to native.
52 virtual void didHandleFetchEvent(int fetchEventID, PassRefPtr<Response> = nu llptr) = 0; 53 virtual void didHandleFetchEvent(int fetchEventID, PassRefPtr<Response> = nu llptr) = 0;
53 virtual void didHandleSyncEvent(int syncEventID) = 0; 54 virtual void didHandleSyncEvent(int syncEventID) = 0;
54 55
55 static const char* supplementName(); 56 static const char* supplementName();
56 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); 57 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*);
57 58
58 protected: 59 protected:
59 ServiceWorkerGlobalScopeClient() { } 60 ServiceWorkerGlobalScopeClient() { }
60 }; 61 };
61 62
62 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtr<Se rviceWorkerGlobalScopeClient>); 63 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtr<Se rviceWorkerGlobalScopeClient>);
63 64
64 } // namespace WebCore 65 } // namespace WebCore
65 66
66 #endif // ServiceWorkerGlobalScopeClient_h 67 #endif // ServiceWorkerGlobalScopeClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698