Chromium Code Reviews| Index: Source/modules/serviceworkers/ServiceWorkerClients.cpp |
| diff --git a/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
| index 3ce5ead79f4acd6de3d2a98b4d78bc6d541cf30a..bb29874224a221a3136fcc7a288840ad80e9a0de 100644 |
| --- a/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
| +++ b/Source/modules/serviceworkers/ServiceWorkerClients.cpp |
| @@ -30,9 +30,11 @@ public: |
| OwnPtr<WebType> webClients = adoptPtr(webClientsRaw); |
| HeapVector<Member<ServiceWorkerClient>> clients; |
| for (size_t i = 0; i < webClients->clients.size(); ++i) { |
| - // FIXME: For now we only support getting "window" type clients. |
| - ASSERT(webClients->clients[i].clientType == WebServiceWorkerClientTypeWindow); |
| - clients.append(ServiceWorkerWindowClient::create(webClients->clients[i])); |
| + WebServiceWorkerClientInfo& client = webClients->clients[i]; |
|
falken
2015/03/31 04:34:32
can this be const?
nhiroki
2015/04/01 04:51:34
Done.
|
| + if (client.clientType == WebServiceWorkerClientTypeWindow) |
| + clients.append(ServiceWorkerWindowClient::create(client)); |
| + else |
| + clients.append(ServiceWorkerClient::create(client)); |
| } |
| return clients; |
| } |
| @@ -81,12 +83,6 @@ ScriptPromise ServiceWorkerClients::matchAll(ScriptState* scriptState, const Cli |
| RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
| ScriptPromise promise = resolver->promise(); |
| - if (options.type() != "window") { |
| - // FIXME: Remove this when query options are supported in the embedder. |
| - resolver->reject(DOMException::create(NotSupportedError, "type parameter of getAll is not supported.")); |
| - return promise; |
| - } |
| - |
| WebServiceWorkerClientQueryOptions webOptions; |
| webOptions.clientType = getClientType(options.type()); |
| webOptions.includeUncontrolled = options.includeUncontrolled(); |