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