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