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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Called from ServiceWorkerClients. | 63 // Called from ServiceWorkerClients. |
64 virtual void getClient(const WebString&, WebServiceWorkerClientCallbacks*) =
0; | 64 virtual void getClient(const WebString&, WebServiceWorkerClientCallbacks*) =
0; |
65 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic
eWorkerClientsCallbacks*) = 0; | 65 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic
eWorkerClientsCallbacks*) = 0; |
66 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0
; | 66 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0
; |
67 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; | 67 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; |
68 virtual void clearCachedMetadata(const WebURL&) = 0; | 68 virtual void clearCachedMetadata(const WebURL&) = 0; |
69 | 69 |
70 virtual WebURL scope() const = 0; | 70 virtual WebURL scope() const = 0; |
71 | 71 |
72 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
) = 0; | 72 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
, double eventDispatchTime) = 0; |
73 virtual void didHandleExtendableMessageEvent(int eventID, WebServiceWorkerEv
entResult) = 0; | 73 virtual void didHandleExtendableMessageEvent(int eventID, WebServiceWorkerEv
entResult, double eventDispatchTime) = 0; |
74 // Calling respondToFetchEvent without response means no response was | 74 // Calling respondToFetchEvent without response means no response was |
75 // provided by the service worker in the fetch events, so fallback to native
. | 75 // provided by the service worker in the fetch events, so fallback to native
. |
76 virtual void respondToFetchEvent(int responseID) = 0; | 76 virtual void respondToFetchEvent(int responseID, double eventDispatchTime) =
0; |
77 virtual void respondToFetchEvent(int responseID, const WebServiceWorkerRespo
nse&) = 0; | 77 virtual void respondToFetchEvent(int responseID, const WebServiceWorkerRespo
nse&, double eventDispatchTime) = 0; |
78 virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventRes
ult) = 0; | 78 virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventRes
ult, double eventDispatchTime) = 0; |
79 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result) = 0; | 79 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result, double eventDispatchTime) = 0; |
80 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv
entResult) = 0; | 80 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv
entResult, double eventDispatchTime) = 0; |
81 virtual void didHandleNotificationCloseEvent(int eventID, WebServiceWorkerEv
entResult) = 0; | 81 virtual void didHandleNotificationCloseEvent(int eventID, WebServiceWorkerEv
entResult, double eventDispatchTime) = 0; |
82 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult
) = 0; | 82 virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult
, double eventDispatchTime) = 0; |
83 virtual void didHandleSyncEvent(int syncEventID, WebServiceWorkerEventResult
) = 0; | 83 virtual void didHandleSyncEvent(int syncEventID, WebServiceWorkerEventResult
, double eventDispatchTime) = 0; |
84 virtual void postMessageToClient(const WebString& clientUUID, const WebStrin
g& message, std::unique_ptr<WebMessagePortChannelArray>) = 0; | 84 virtual void postMessageToClient(const WebString& clientUUID, const WebStrin
g& message, std::unique_ptr<WebMessagePortChannelArray>) = 0; |
85 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
rClient&, const WebString& message, std::unique_ptr<WebMessagePortChannelArray>)
= 0; | 85 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
rClient&, const WebString& message, std::unique_ptr<WebMessagePortChannelArray>)
= 0; |
86 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0; | 86 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0; |
87 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0; | 87 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0; |
88 virtual void focus(const WebString& clientUUID, WebServiceWorkerClientCallba
cks*) = 0; | 88 virtual void focus(const WebString& clientUUID, WebServiceWorkerClientCallba
cks*) = 0; |
89 virtual void navigate(const WebString& clientUUID, const WebURL&, WebService
WorkerClientCallbacks*) = 0; | 89 virtual void navigate(const WebString& clientUUID, const WebURL&, WebService
WorkerClientCallbacks*) = 0; |
90 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes,
const WebVector<WebSecurityOrigin>&) = 0; | 90 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes,
const WebVector<WebSecurityOrigin>&) = 0; |
91 | 91 |
92 static const char* supplementName(); | 92 static const char* supplementName(); |
93 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 93 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); |
94 | 94 |
95 protected: | 95 protected: |
96 ServiceWorkerGlobalScopeClient() { } | 96 ServiceWorkerGlobalScopeClient() { } |
97 }; | 97 }; |
98 | 98 |
99 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*
, ServiceWorkerGlobalScopeClient*); | 99 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*
, ServiceWorkerGlobalScopeClient*); |
100 | 100 |
101 } // namespace blink | 101 } // namespace blink |
102 | 102 |
103 #endif // ServiceWorkerGlobalScopeClient_h | 103 #endif // ServiceWorkerGlobalScopeClient_h |
OLD | NEW |