| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ~ServiceWorker() override; | 55 ~ServiceWorker() override; |
| 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 #if ENABLE(OILPAN) | 59 #if ENABLE(OILPAN) |
| 60 // Override 'operator new' to enforce allocation of eagerly finalized object
. | 60 // Override 'operator new' to enforce allocation of eagerly finalized object
. |
| 61 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); | 61 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); | 64 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); |
| 65 void terminate(ExceptionState&); | |
| 66 | 65 |
| 67 String scriptURL() const; | 66 String scriptURL() const; |
| 68 String state() const; | 67 String state() const; |
| 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 70 | 69 |
| 71 // WebServiceWorkerProxy overrides. | 70 // WebServiceWorkerProxy overrides. |
| 72 virtual void dispatchStateChangeEvent() override; | 71 virtual void dispatchStateChangeEvent() override; |
| 73 | 72 |
| 74 // AbstractWorker overrides. | 73 // AbstractWorker overrides. |
| 75 virtual const AtomicString& interfaceName() const override; | 74 virtual const AtomicString& interfaceName() const override; |
| 76 | 75 |
| 77 void internalsTerminate(); | 76 void internalsTerminate(); |
| 78 private: | 77 private: |
| 79 static PassRefPtrWillBeRawPtr<ServiceWorker> getOrCreate(ExecutionContext*,
WebType*); | 78 static PassRefPtrWillBeRawPtr<ServiceWorker> getOrCreate(ExecutionContext*,
WebType*); |
| 80 ServiceWorker(ExecutionContext*, PassOwnPtr<WebServiceWorker>); | 79 ServiceWorker(ExecutionContext*, PassOwnPtr<WebServiceWorker>); |
| 81 | 80 |
| 82 // ActiveDOMObject overrides. | 81 // ActiveDOMObject overrides. |
| 83 virtual bool hasPendingActivity() const override; | 82 virtual bool hasPendingActivity() const override; |
| 84 virtual void stop() override; | 83 virtual void stop() override; |
| 85 | 84 |
| 86 OwnPtr<WebServiceWorker> m_outerWorker; | 85 OwnPtr<WebServiceWorker> m_outerWorker; |
| 87 bool m_wasStopped; | 86 bool m_wasStopped; |
| 88 }; | 87 }; |
| 89 | 88 |
| 90 } // namespace blink | 89 } // namespace blink |
| 91 | 90 |
| 92 #endif // ServiceWorker_h | 91 #endif // ServiceWorker_h |
| OLD | NEW |