| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Eager finalization needed to promptly release owned WebServiceWorker. | 57 // Eager finalization needed to promptly release owned WebServiceWorker. |
| 58 EAGERLY_FINALIZE(); | 58 EAGERLY_FINALIZE(); |
| 59 | 59 |
| 60 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray&, ExceptionState&); | 60 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray&, ExceptionState&); |
| 61 | 61 |
| 62 String scriptURL() const; | 62 String scriptURL() const; |
| 63 String state() const; | 63 String state() const; |
| 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 65 | 65 |
| 66 // ScriptWrappable overrides. |
| 67 bool hasPendingActivity() const final; |
| 68 |
| 66 // WebServiceWorkerProxy overrides. | 69 // WebServiceWorkerProxy overrides. |
| 67 void dispatchStateChangeEvent() override; | 70 void dispatchStateChangeEvent() override; |
| 68 | 71 |
| 69 // AbstractWorker overrides. | 72 // AbstractWorker overrides. |
| 70 const AtomicString& interfaceName() const override; | 73 const AtomicString& interfaceName() const override; |
| 71 | 74 |
| 72 void internalsTerminate(); | 75 void internalsTerminate(); |
| 73 private: | 76 private: |
| 74 static ServiceWorker* getOrCreate(ExecutionContext*, std::unique_ptr<WebServ
iceWorker::Handle>); | 77 static ServiceWorker* getOrCreate(ExecutionContext*, std::unique_ptr<WebServ
iceWorker::Handle>); |
| 75 ServiceWorker(ExecutionContext*, std::unique_ptr<WebServiceWorker::Handle>); | 78 ServiceWorker(ExecutionContext*, std::unique_ptr<WebServiceWorker::Handle>); |
| 76 | 79 |
| 77 // ActiveScriptWrappable overrides. | |
| 78 bool hasPendingActivity() const final; | |
| 79 | |
| 80 // ActiveDOMObject overrides. | 80 // ActiveDOMObject overrides. |
| 81 void stop() override; | 81 void stop() override; |
| 82 | 82 |
| 83 // A handle to the service worker representation in the embedder. | 83 // A handle to the service worker representation in the embedder. |
| 84 std::unique_ptr<WebServiceWorker::Handle> m_handle; | 84 std::unique_ptr<WebServiceWorker::Handle> m_handle; |
| 85 bool m_wasStopped; | 85 bool m_wasStopped; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| 89 | 89 |
| 90 #endif // ServiceWorker_h | 90 #endif // ServiceWorker_h |
| OLD | NEW |