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 "bindings/core/v8/ActiveScriptWrappable.h" |
35 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
36 #include "core/workers/AbstractWorker.h" | 37 #include "core/workers/AbstractWorker.h" |
37 #include "platform/Supplementable.h" | 38 #include "platform/Supplementable.h" |
38 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class ExceptionState; | 43 class ExceptionState; |
43 | 44 |
44 class CORE_EXPORT SharedWorker final : public AbstractWorker, public HeapSupplem
entable<SharedWorker> { | 45 class CORE_EXPORT SharedWorker final : public AbstractWorker, public HeapSupplem
entable<SharedWorker>, public ActiveScriptWrappable { |
45 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
46 USING_GARBAGE_COLLECTED_MIXIN(SharedWorker); | 47 USING_GARBAGE_COLLECTED_MIXIN(SharedWorker); |
47 public: | 48 public: |
48 static SharedWorker* create(ExecutionContext*, const String& url, const Stri
ng& name, ExceptionState&); | 49 static SharedWorker* create(ExecutionContext*, const String& url, const Stri
ng& name, ExceptionState&); |
49 ~SharedWorker() override; | 50 ~SharedWorker() override; |
50 | 51 |
51 MessagePort* port() const { return m_port.get(); } | 52 MessagePort* port() const { return m_port.get(); } |
52 | 53 |
53 const AtomicString& interfaceName() const override; | 54 const AtomicString& interfaceName() const override; |
54 | 55 |
55 void setIsBeingConnected(bool b) { m_isBeingConnected = b; } | 56 void setIsBeingConnected(bool b) { m_isBeingConnected = b; } |
56 | 57 |
57 bool hasPendingActivity() const override; | 58 bool hasPendingActivity() const final; |
58 | 59 |
59 DECLARE_VIRTUAL_TRACE(); | 60 DECLARE_VIRTUAL_TRACE(); |
60 | 61 |
61 private: | 62 private: |
62 explicit SharedWorker(ExecutionContext*); | 63 explicit SharedWorker(ExecutionContext*); |
63 | 64 |
64 Member<MessagePort> m_port; | 65 Member<MessagePort> m_port; |
65 bool m_isBeingConnected; | 66 bool m_isBeingConnected; |
66 }; | 67 }; |
67 | 68 |
68 } // namespace blink | 69 } // namespace blink |
69 | 70 |
70 #endif // SharedWorker_h | 71 #endif // SharedWorker_h |
OLD | NEW |