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 25 matching lines...) Expand all Loading... |
36 #include "public/platform/WebMessagePortChannel.h" | 36 #include "public/platform/WebMessagePortChannel.h" |
37 #include "public/platform/WebServiceWorkerClientsClaimCallbacks.h" | 37 #include "public/platform/WebServiceWorkerClientsClaimCallbacks.h" |
38 #include "public/platform/WebServiceWorkerClientsInfo.h" | 38 #include "public/platform/WebServiceWorkerClientsInfo.h" |
39 #include "public/platform/WebServiceWorkerEventResult.h" | 39 #include "public/platform/WebServiceWorkerEventResult.h" |
40 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 40 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 #include "wtf/Noncopyable.h" | 42 #include "wtf/Noncopyable.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
| 46 struct WebCrossOriginServiceWorkerClient; |
| 47 struct WebServiceWorkerClientQueryOptions; |
46 class ExecutionContext; | 48 class ExecutionContext; |
47 struct WebCrossOriginServiceWorkerClient; | |
48 class WebServiceWorkerCacheStorage; | 49 class WebServiceWorkerCacheStorage; |
49 class WebServiceWorkerResponse; | 50 class WebServiceWorkerResponse; |
50 class WebURL; | 51 class WebURL; |
51 class WorkerClients; | 52 class WorkerClients; |
52 | 53 |
53 // See WebServiceWorkerContextClient for documentation for the methods in this c
lass. | 54 // See WebServiceWorkerContextClient for documentation for the methods in this c
lass. |
54 class ServiceWorkerGlobalScopeClient : public WillBeHeapSupplement<WorkerClients
> { | 55 class ServiceWorkerGlobalScopeClient : public WillBeHeapSupplement<WorkerClients
> { |
55 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient); | 56 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient); |
56 public: | 57 public: |
57 virtual ~ServiceWorkerGlobalScopeClient() { } | 58 virtual ~ServiceWorkerGlobalScopeClient() { } |
58 | 59 |
59 // Called from ServiceWorkerClients. | 60 // Called from ServiceWorkerClients. |
60 virtual void getClients(WebServiceWorkerClientsCallbacks*) = 0; | 61 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic
eWorkerClientsCallbacks*) = 0; |
61 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0
; | 62 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0
; |
62 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; | 63 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; |
63 virtual void clearCachedMetadata(const WebURL&) = 0; | 64 virtual void clearCachedMetadata(const WebURL&) = 0; |
64 | 65 |
65 virtual WebURL scope() const = 0; | 66 virtual WebURL scope() const = 0; |
66 virtual WebServiceWorkerCacheStorage* cacheStorage() const = 0; | 67 virtual WebServiceWorkerCacheStorage* cacheStorage() const = 0; |
67 | 68 |
68 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
) = 0; | 69 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
) = 0; |
69 // Calling didHandleFetchEvent without response means no response was | 70 // Calling didHandleFetchEvent without response means no response was |
70 // provided by the service worker in the fetch events, so fallback to native
. | 71 // provided by the service worker in the fetch events, so fallback to native
. |
(...skipping 15 matching lines...) Expand all Loading... |
86 | 87 |
87 protected: | 88 protected: |
88 ServiceWorkerGlobalScopeClient() { } | 89 ServiceWorkerGlobalScopeClient() { } |
89 }; | 90 }; |
90 | 91 |
91 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtrWil
lBeRawPtr<ServiceWorkerGlobalScopeClient>); | 92 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtrWil
lBeRawPtr<ServiceWorkerGlobalScopeClient>); |
92 | 93 |
93 } // namespace blink | 94 } // namespace blink |
94 | 95 |
95 #endif // ServiceWorkerGlobalScopeClient_h | 96 #endif // ServiceWorkerGlobalScopeClient_h |
OLD | NEW |