OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 didHandleInstallEvent(int installEventID, blink::WebServiceWork
erEventResult) = 0; | 50 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. | 51 // 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; | 52 virtual void didHandleFetchEvent(int fetchEventID, PassRefPtr<Response> = nu
llptr) = 0; |
| 53 virtual void didHandleSyncEvent(int syncEventID) = 0; |
53 | 54 |
54 static const char* supplementName(); | 55 static const char* supplementName(); |
55 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 56 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); |
56 | 57 |
57 protected: | 58 protected: |
58 ServiceWorkerGlobalScopeClient() { } | 59 ServiceWorkerGlobalScopeClient() { } |
59 }; | 60 }; |
60 | 61 |
61 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtr<Se
rviceWorkerGlobalScopeClient>); | 62 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtr<Se
rviceWorkerGlobalScopeClient>); |
62 | 63 |
63 } // namespace WebCore | 64 } // namespace WebCore |
64 | 65 |
65 #endif // ServiceWorkerGlobalScopeClient_h | 66 #endif // ServiceWorkerGlobalScopeClient_h |
OLD | NEW |