OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 #include "config.h" | 30 #include "config.h" |
31 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 31 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
32 | 32 |
33 #include "RuntimeEnabledFeatures.h" | 33 #include "RuntimeEnabledFeatures.h" |
34 #include "V8ServiceWorker.h" | 34 #include "V8ServiceWorker.h" |
35 #include "bindings/v8/ScriptPromiseResolver.h" | 35 #include "bindings/v8/ScriptPromiseResolver.h" |
36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
37 #include "core/loader/DocumentLoader.h" | 37 #include "core/loader/DocumentLoader.h" |
38 #include "core/loader/FrameLoaderClient.h" | 38 #include "core/loader/FrameLoaderClient.h" |
39 #include "core/page/Frame.h" | 39 #include "core/page/Frame.h" |
40 #include "core/page/Navigator.h" | 40 #include "core/frame/Navigator.h" |
41 #include "core/workers/SharedWorker.h" | 41 #include "core/workers/SharedWorker.h" |
42 #include "modules/serviceworkers/CallbackPromiseAdapter.h" | 42 #include "modules/serviceworkers/CallbackPromiseAdapter.h" |
43 #include "modules/serviceworkers/ServiceWorker.h" | 43 #include "modules/serviceworkers/ServiceWorker.h" |
44 #include "public/platform/WebServiceWorkerRegistry.h" | 44 #include "public/platform/WebServiceWorkerRegistry.h" |
45 #include "public/platform/WebString.h" | 45 #include "public/platform/WebString.h" |
46 #include "public/platform/WebURL.h" | 46 #include "public/platform/WebURL.h" |
47 | 47 |
48 namespace WebCore { | 48 namespace WebCore { |
49 | 49 |
50 NavigatorServiceWorker::NavigatorServiceWorker(Navigator* navigator) | 50 NavigatorServiceWorker::NavigatorServiceWorker(Navigator* navigator) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 WebKit::WebServiceWorkerRegistry* peer = client->serviceWorkerRegistry(); | 106 WebKit::WebServiceWorkerRegistry* peer = client->serviceWorkerRegistry(); |
107 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tExecutionContext); | 107 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tExecutionContext); |
108 if (peer) | 108 if (peer) |
109 peer->unregisterServiceWorker(pattern, new CallbackPromiseAdapter(resolv
er, scriptExecutionContext)); | 109 peer->unregisterServiceWorker(pattern, new CallbackPromiseAdapter(resolv
er, scriptExecutionContext)); |
110 else | 110 else |
111 resolver->reject(PassRefPtr<ServiceWorker>(0)); | 111 resolver->reject(PassRefPtr<ServiceWorker>(0)); |
112 return resolver->promise(); | 112 return resolver->promise(); |
113 } | 113 } |
114 | 114 |
115 } // namespace WebCore | 115 } // namespace WebCore |
OLD | NEW |