OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef SharedWorker_h | 32 #ifndef SharedWorker_h |
33 #define SharedWorker_h | 33 #define SharedWorker_h |
34 | 34 |
| 35 #include "core/dom/ActiveDOMObject.h" |
35 #include "core/workers/AbstractWorker.h" | 36 #include "core/workers/AbstractWorker.h" |
36 | 37 |
37 namespace WebCore { | 38 namespace WebCore { |
38 | 39 |
39 class SharedWorker : public AbstractWorker { | 40 class SharedWorker : public AbstractWorker, public ScriptWrappable, public A
ctiveDOMObject { |
40 public: | 41 public: |
41 static PassRefPtr<SharedWorker> create(ScriptExecutionContext*, const St
ring& url, const String& name, ExceptionCode&); | 42 static PassRefPtr<SharedWorker> create(ScriptExecutionContext*, const St
ring& url, const String& name, ExceptionCode&); |
42 virtual ~SharedWorker(); | 43 virtual ~SharedWorker(); |
43 | 44 |
44 MessagePort* port() const { return m_port.get(); } | 45 MessagePort* port() const { return m_port.get(); } |
45 | 46 |
46 virtual const AtomicString& interfaceName() const OVERRIDE; | 47 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 48 virtual void contextDestroyed() OVERRIDE; |
| 49 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE
{ return ActiveDOMObject::scriptExecutionContext(); } |
47 | 50 |
48 private: | 51 private: |
49 explicit SharedWorker(ScriptExecutionContext*); | 52 explicit SharedWorker(ScriptExecutionContext*); |
50 | 53 |
51 RefPtr<MessagePort> m_port; | 54 RefPtr<MessagePort> m_port; |
52 }; | 55 }; |
53 | 56 |
54 } // namespace WebCore | 57 } // namespace WebCore |
55 | 58 |
56 #endif // SharedWorker_h | 59 #endif // SharedWorker_h |
OLD | NEW |