OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 35 matching lines...) Loading... |
46 class ScriptExecutionContext; | 46 class ScriptExecutionContext; |
47 | 47 |
48 class AbstractWorker : public RefCountedGarbageCollected<AbstractWorker>, pu
blic ActiveDOMObject, public EventTarget { | 48 class AbstractWorker : public RefCountedGarbageCollected<AbstractWorker>, pu
blic ActiveDOMObject, public EventTarget { |
49 DECLARE_GC_INFO | 49 DECLARE_GC_INFO |
50 public: | 50 public: |
51 // EventTarget APIs | 51 // EventTarget APIs |
52 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE
{ return ActiveDOMObject::scriptExecutionContext(); } | 52 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE
{ return ActiveDOMObject::scriptExecutionContext(); } |
53 | 53 |
54 virtual void trace(Visitor*) { } | 54 virtual void trace(Visitor*) { } |
55 | 55 |
56 virtual void visitWith(Visitor* visitor) const OVERRIDE | 56 virtual void adjustAndMark(Visitor* visitor) const OVERRIDE |
57 { | 57 { |
58 visitor->visit(this); | 58 visitor->mark(this); |
59 } | 59 } |
60 | 60 |
61 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 61 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
62 | 62 |
63 using RefCountedGarbageCollected<AbstractWorker>::ref; | 63 using RefCountedGarbageCollected<AbstractWorker>::ref; |
64 using RefCountedGarbageCollected<AbstractWorker>::deref; | 64 using RefCountedGarbageCollected<AbstractWorker>::deref; |
65 | 65 |
66 virtual void contextDestroyed() OVERRIDE; | 66 virtual void contextDestroyed() OVERRIDE; |
67 AbstractWorker(ScriptExecutionContext*); | 67 AbstractWorker(ScriptExecutionContext*); |
68 virtual ~AbstractWorker(); | 68 virtual ~AbstractWorker(); |
69 | 69 |
70 protected: | 70 protected: |
71 // Helper function that converts a URL to an absolute URL and checks the
result for validity. | 71 // Helper function that converts a URL to an absolute URL and checks the
result for validity. |
72 KURL resolveURL(const String& url, ExceptionCode& ec); | 72 KURL resolveURL(const String& url, ExceptionCode& ec); |
73 intptr_t asID() const { return reinterpret_cast<intptr_t>(this); } | 73 intptr_t asID() const { return reinterpret_cast<intptr_t>(this); } |
74 | 74 |
75 private: | 75 private: |
76 virtual EventTargetData* eventTargetData() OVERRIDE; | 76 virtual EventTargetData* eventTargetData() OVERRIDE; |
77 virtual EventTargetData* ensureEventTargetData() OVERRIDE; | 77 virtual EventTargetData* ensureEventTargetData() OVERRIDE; |
78 | 78 |
79 EventTargetData m_eventTargetData; | 79 EventTargetData m_eventTargetData; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace WebCore | 82 } // namespace WebCore |
83 | 83 |
84 #endif // AbstractWorker_h | 84 #endif // AbstractWorker_h |
OLD | NEW |