| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class ServiceWorker FINAL : public AbstractWorker, public WebServiceWorkerProxy
{ | 49 class ServiceWorker FINAL : public AbstractWorker, public WebServiceWorkerProxy
{ |
| 50 public: | 50 public: |
| 51 // For CallbackPromiseAdapter | 51 // For CallbackPromiseAdapter |
| 52 typedef WebServiceWorker WebType; | 52 typedef WebServiceWorker WebType; |
| 53 static PassRefPtrWillBeRawPtr<ServiceWorker> take(ScriptPromiseResolver*, We
bType* worker); | 53 static PassRefPtrWillBeRawPtr<ServiceWorker> take(ScriptPromiseResolver*, We
bType* worker); |
| 54 | 54 |
| 55 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType
*); | 55 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType
*); |
| 56 static void dispose(WebType*); | 56 static void dispose(WebType*); |
| 57 | 57 |
| 58 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); | 58 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); |
| 59 void terminate(ExceptionState&); |
| 59 | 60 |
| 60 String scriptURL() const; | 61 String scriptURL() const; |
| 61 const AtomicString& state() const; | 62 const AtomicString& state() const; |
| 62 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 63 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 63 | 64 |
| 64 // WebServiceWorkerProxy overrides. | 65 // WebServiceWorkerProxy overrides. |
| 65 virtual bool isReady() OVERRIDE; | 66 virtual bool isReady() OVERRIDE; |
| 66 virtual void dispatchStateChangeEvent() OVERRIDE; | 67 virtual void dispatchStateChangeEvent() OVERRIDE; |
| 67 | 68 |
| 68 // AbstractWorker overrides. | 69 // AbstractWorker overrides. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 88 virtual bool hasPendingActivity() const OVERRIDE; | 89 virtual bool hasPendingActivity() const OVERRIDE; |
| 89 virtual void stop() OVERRIDE; | 90 virtual void stop() OVERRIDE; |
| 90 | 91 |
| 91 OwnPtr<WebServiceWorker> m_outerWorker; | 92 OwnPtr<WebServiceWorker> m_outerWorker; |
| 92 ProxyState m_proxyState; | 93 ProxyState m_proxyState; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace blink | 96 } // namespace blink |
| 96 | 97 |
| 97 #endif // ServiceWorker_h | 98 #endif // ServiceWorker_h |
| OLD | NEW |