| 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 19 matching lines...) Expand all  Loading... | 
| 30 | 30 | 
| 31 #ifndef ServiceWorkerGlobalScopeClient_h | 31 #ifndef ServiceWorkerGlobalScopeClient_h | 
| 32 #define ServiceWorkerGlobalScopeClient_h | 32 #define ServiceWorkerGlobalScopeClient_h | 
| 33 | 33 | 
| 34 #include "core/dom/MessagePort.h" | 34 #include "core/dom/MessagePort.h" | 
| 35 #include "core/workers/WorkerClients.h" | 35 #include "core/workers/WorkerClients.h" | 
| 36 #include "public/platform/WebMessagePortChannel.h" | 36 #include "public/platform/WebMessagePortChannel.h" | 
| 37 #include "public/platform/WebServiceWorkerClientFocusCallback.h" | 37 #include "public/platform/WebServiceWorkerClientFocusCallback.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/WebServiceWorkerOpenWindowCallbacks.h" | 
| 40 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 41 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 
| 41 #include "wtf/Forward.h" | 42 #include "wtf/Forward.h" | 
| 42 #include "wtf/Noncopyable.h" | 43 #include "wtf/Noncopyable.h" | 
| 43 | 44 | 
| 44 namespace blink { | 45 namespace blink { | 
| 45 | 46 | 
| 46 class ExecutionContext; | 47 class ExecutionContext; | 
| 47 struct WebCrossOriginServiceWorkerClient; | 48 struct WebCrossOriginServiceWorkerClient; | 
| 48 class WebServiceWorkerCacheStorage; | 49 class WebServiceWorkerCacheStorage; | 
| 49 class WebServiceWorkerResponse; | 50 class WebServiceWorkerResponse; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 63     virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
    ) = 0; | 64     virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult
    ) = 0; | 
| 64     // Calling didHandleFetchEvent without response means no response was | 65     // Calling didHandleFetchEvent without response means no response was | 
| 65     // provided by the service worker in the fetch events, so fallback to native
    . | 66     // provided by the service worker in the fetch events, so fallback to native
    . | 
| 66     virtual void didHandleFetchEvent(int fetchEventID) = 0; | 67     virtual void didHandleFetchEvent(int fetchEventID) = 0; | 
| 67     virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes
    ponse&) = 0; | 68     virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes
    ponse&) = 0; | 
| 68     virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
    Result) = 0; | 69     virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
    Result) = 0; | 
| 69     virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv
    entResult) = 0; | 70     virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv
    entResult) = 0; | 
| 70     virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult
    ) = 0; | 71     virtual void didHandlePushEvent(int pushEventID, WebServiceWorkerEventResult
    ) = 0; | 
| 71     virtual void didHandleSyncEvent(int syncEventID) = 0; | 72     virtual void didHandleSyncEvent(int syncEventID) = 0; | 
| 72     virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep
    tConnect) = 0; | 73     virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep
    tConnect) = 0; | 
|  | 74     virtual void openWindow(const WebURL&, WebServiceWorkerOpenWindowCallbacks*)
     = 0; | 
| 73     virtual void postMessageToClient(int clientID, const WebString& message, Pas
    sOwnPtr<WebMessagePortChannelArray>) = 0; | 75     virtual void postMessageToClient(int clientID, const WebString& message, Pas
    sOwnPtr<WebMessagePortChannelArray>) = 0; | 
| 74     virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
    rClient&, const WebString& message, PassOwnPtr<WebMessagePortChannelArray>) = 0; | 76     virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
    rClient&, const WebString& message, PassOwnPtr<WebMessagePortChannelArray>) = 0; | 
| 75     virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0; | 77     virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0; | 
| 76     virtual void focus(int clientID, WebServiceWorkerClientFocusCallback*) = 0; | 78     virtual void focus(int clientID, WebServiceWorkerClientFocusCallback*) = 0; | 
| 77 | 79 | 
| 78     static const char* supplementName(); | 80     static const char* supplementName(); | 
| 79     static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 81     static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 
| 80 | 82 | 
| 81 protected: | 83 protected: | 
| 82     ServiceWorkerGlobalScopeClient() { } | 84     ServiceWorkerGlobalScopeClient() { } | 
| 83 }; | 85 }; | 
| 84 | 86 | 
| 85 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtrWil
    lBeRawPtr<ServiceWorkerGlobalScopeClient>); | 87 void provideServiceWorkerGlobalScopeClientToWorker(WorkerClients*, PassOwnPtrWil
    lBeRawPtr<ServiceWorkerGlobalScopeClient>); | 
| 86 | 88 | 
| 87 } // namespace blink | 89 } // namespace blink | 
| 88 | 90 | 
| 89 #endif // ServiceWorkerGlobalScopeClient_h | 91 #endif // ServiceWorkerGlobalScopeClient_h | 
| OLD | NEW | 
|---|