| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 static ServiceWorker* from(ExecutionContext*, PassOwnPtr<WebServiceWorker::H
andle>); | 52 static ServiceWorker* from(ExecutionContext*, PassOwnPtr<WebServiceWorker::H
andle>); |
| 53 | 53 |
| 54 ~ServiceWorker() override; | 54 ~ServiceWorker() override; |
| 55 | 55 |
| 56 // Eager finalization needed to promptly release owned WebServiceWorker. | 56 // Eager finalization needed to promptly release owned WebServiceWorker. |
| 57 EAGERLY_FINALIZE(); | 57 EAGERLY_FINALIZE(); |
| 58 | 58 |
| 59 // Override 'operator new' to enforce allocation of eagerly finalized object
. | 59 // Override 'operator new' to enforce allocation of eagerly finalized object
. |
| 60 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); | 60 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); |
| 61 | 61 |
| 62 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); | 62 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray&, ExceptionState&); |
| 63 | 63 |
| 64 String scriptURL() const; | 64 String scriptURL() const; |
| 65 String state() const; | 65 String state() const; |
| 66 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 66 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 67 | 67 |
| 68 // WebServiceWorkerProxy overrides. | 68 // WebServiceWorkerProxy overrides. |
| 69 void dispatchStateChangeEvent() override; | 69 void dispatchStateChangeEvent() override; |
| 70 | 70 |
| 71 // AbstractWorker overrides. | 71 // AbstractWorker overrides. |
| 72 const AtomicString& interfaceName() const override; | 72 const AtomicString& interfaceName() const override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 83 void stop() override; | 83 void stop() override; |
| 84 | 84 |
| 85 // A handle to the service worker representation in the embedder. | 85 // A handle to the service worker representation in the embedder. |
| 86 OwnPtr<WebServiceWorker::Handle> m_handle; | 86 OwnPtr<WebServiceWorker::Handle> m_handle; |
| 87 bool m_wasStopped; | 87 bool m_wasStopped; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| 91 | 91 |
| 92 #endif // ServiceWorker_h | 92 #endif // ServiceWorker_h |
| OLD | NEW |