| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 class MODULES_EXPORT ServiceWorkerGlobalScopeClient | 57 class MODULES_EXPORT ServiceWorkerGlobalScopeClient |
| 58 : public Supplement<WorkerClients> { | 58 : public Supplement<WorkerClients> { |
| 59 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient); | 59 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeClient); |
| 60 DISALLOW_NEW(); | 60 DISALLOW_NEW(); |
| 61 | 61 |
| 62 public: | 62 public: |
| 63 virtual ~ServiceWorkerGlobalScopeClient() {} | 63 virtual ~ServiceWorkerGlobalScopeClient() {} |
| 64 | 64 |
| 65 // Called from ServiceWorkerClients. | 65 // Called from ServiceWorkerClients. |
| 66 virtual void getClient(const WebString&, | 66 virtual void getClient(const WebString&, |
| 67 WebServiceWorkerClientCallbacks*) = 0; | 67 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; |
| 68 virtual void getClients(const WebServiceWorkerClientQueryOptions&, | 68 virtual void getClients( |
| 69 WebServiceWorkerClientsCallbacks*) = 0; | 69 const WebServiceWorkerClientQueryOptions&, |
| 70 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0; | 70 std::unique_ptr<WebServiceWorkerClientsCallbacks>) = 0; |
| 71 virtual void openWindow(const WebURL&, |
| 72 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; |
| 71 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; | 73 virtual void setCachedMetadata(const WebURL&, const char*, size_t) = 0; |
| 72 virtual void clearCachedMetadata(const WebURL&) = 0; | 74 virtual void clearCachedMetadata(const WebURL&) = 0; |
| 73 | 75 |
| 74 virtual WebURL scope() const = 0; | 76 virtual WebURL scope() const = 0; |
| 75 | 77 |
| 76 virtual void didHandleActivateEvent(int eventID, | 78 virtual void didHandleActivateEvent(int eventID, |
| 77 WebServiceWorkerEventResult, | 79 WebServiceWorkerEventResult, |
| 78 double eventDispatchTime) = 0; | 80 double eventDispatchTime) = 0; |
| 79 virtual void didHandleExtendableMessageEvent(int eventID, | 81 virtual void didHandleExtendableMessageEvent(int eventID, |
| 80 WebServiceWorkerEventResult, | 82 WebServiceWorkerEventResult, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 WebServiceWorkerEventResult, | 107 WebServiceWorkerEventResult, |
| 106 double eventDispatchTime) = 0; | 108 double eventDispatchTime) = 0; |
| 107 virtual void postMessageToClient( | 109 virtual void postMessageToClient( |
| 108 const WebString& clientUUID, | 110 const WebString& clientUUID, |
| 109 const WebString& message, | 111 const WebString& message, |
| 110 std::unique_ptr<WebMessagePortChannelArray>) = 0; | 112 std::unique_ptr<WebMessagePortChannelArray>) = 0; |
| 111 virtual void postMessageToCrossOriginClient( | 113 virtual void postMessageToCrossOriginClient( |
| 112 const WebCrossOriginServiceWorkerClient&, | 114 const WebCrossOriginServiceWorkerClient&, |
| 113 const WebString& message, | 115 const WebString& message, |
| 114 std::unique_ptr<WebMessagePortChannelArray>) = 0; | 116 std::unique_ptr<WebMessagePortChannelArray>) = 0; |
| 115 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0; | 117 virtual void skipWaiting( |
| 116 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0; | 118 std::unique_ptr<WebServiceWorkerSkipWaitingCallbacks>) = 0; |
| 119 virtual void claim( |
| 120 std::unique_ptr<WebServiceWorkerClientsClaimCallbacks>) = 0; |
| 117 virtual void focus(const WebString& clientUUID, | 121 virtual void focus(const WebString& clientUUID, |
| 118 WebServiceWorkerClientCallbacks*) = 0; | 122 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; |
| 119 virtual void navigate(const WebString& clientUUID, | 123 virtual void navigate(const WebString& clientUUID, |
| 120 const WebURL&, | 124 const WebURL&, |
| 121 WebServiceWorkerClientCallbacks*) = 0; | 125 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; |
| 122 virtual void registerForeignFetchScopes( | 126 virtual void registerForeignFetchScopes( |
| 123 const WebVector<WebURL>& subScopes, | 127 const WebVector<WebURL>& subScopes, |
| 124 const WebVector<WebSecurityOrigin>&) = 0; | 128 const WebVector<WebSecurityOrigin>&) = 0; |
| 125 | 129 |
| 126 static const char* supplementName(); | 130 static const char* supplementName(); |
| 127 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 131 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); |
| 128 | 132 |
| 129 protected: | 133 protected: |
| 130 ServiceWorkerGlobalScopeClient() {} | 134 ServiceWorkerGlobalScopeClient() {} |
| 131 }; | 135 }; |
| 132 | 136 |
| 133 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker( | 137 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker( |
| 134 WorkerClients*, | 138 WorkerClients*, |
| 135 ServiceWorkerGlobalScopeClient*); | 139 ServiceWorkerGlobalScopeClient*); |
| 136 | 140 |
| 137 } // namespace blink | 141 } // namespace blink |
| 138 | 142 |
| 139 #endif // ServiceWorkerGlobalScopeClient_h | 143 #endif // ServiceWorkerGlobalScopeClient_h |
| OLD | NEW |