| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void postMessage(ExecutionContext*, | 62 void postMessage(ExecutionContext*, |
| 63 PassRefPtr<SerializedScriptValue> message, | 63 PassRefPtr<SerializedScriptValue> message, |
| 64 const MessagePortArray&, | 64 const MessagePortArray&, |
| 65 ExceptionState&); | 65 ExceptionState&); |
| 66 static bool canTransferArrayBuffersAndImageBitmaps() { return false; } | 66 static bool canTransferArrayBuffersAndImageBitmaps() { return false; } |
| 67 | 67 |
| 68 String scriptURL() const; | 68 String scriptURL() const; |
| 69 String state() const; | 69 String state() const; |
| 70 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 70 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 71 | 71 |
| 72 ServiceWorker* toServiceWorker() override { return this; } |
| 73 |
| 72 // ScriptWrappable overrides. | 74 // ScriptWrappable overrides. |
| 73 bool hasPendingActivity() const final; | 75 bool hasPendingActivity() const final; |
| 74 | 76 |
| 75 // WebServiceWorkerProxy overrides. | 77 // WebServiceWorkerProxy overrides. |
| 76 void dispatchStateChangeEvent() override; | 78 void dispatchStateChangeEvent() override; |
| 77 | 79 |
| 78 // AbstractWorker overrides. | 80 // AbstractWorker overrides. |
| 79 const AtomicString& interfaceName() const override; | 81 const AtomicString& interfaceName() const override; |
| 80 | 82 |
| 81 void internalsTerminate(); | 83 void internalsTerminate(); |
| 82 | 84 |
| 83 private: | 85 private: |
| 84 static ServiceWorker* getOrCreate(ExecutionContext*, | 86 static ServiceWorker* getOrCreate(ExecutionContext*, |
| 85 std::unique_ptr<WebServiceWorker::Handle>); | 87 std::unique_ptr<WebServiceWorker::Handle>); |
| 86 ServiceWorker(ExecutionContext*, std::unique_ptr<WebServiceWorker::Handle>); | 88 ServiceWorker(ExecutionContext*, std::unique_ptr<WebServiceWorker::Handle>); |
| 87 | 89 |
| 88 // SuspendableObject overrides. | 90 // SuspendableObject overrides. |
| 89 void contextDestroyed() override; | 91 void contextDestroyed() override; |
| 90 | 92 |
| 91 // A handle to the service worker representation in the embedder. | 93 // A handle to the service worker representation in the embedder. |
| 92 std::unique_ptr<WebServiceWorker::Handle> m_handle; | 94 std::unique_ptr<WebServiceWorker::Handle> m_handle; |
| 93 bool m_wasStopped; | 95 bool m_wasStopped; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 } // namespace blink | 98 } // namespace blink |
| 97 | 99 |
| 98 #endif // ServiceWorker_h | 100 #endif // ServiceWorker_h |
| OLD | NEW |