| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const KURL& url() const { return m_url; } | 69 const KURL& url() const { return m_url; } |
| 70 KURL completeURL(const String&) const; | 70 KURL completeURL(const String&) const; |
| 71 | 71 |
| 72 const GroupSettings* groupSettings() { return m_groupSettings.get(); } | 72 const GroupSettings* groupSettings() { return m_groupSettings.get(); } |
| 73 virtual String userAgent(const KURL&) const; | 73 virtual String userAgent(const KURL&) const; |
| 74 | 74 |
| 75 virtual void disableEval(const String& errorMessage) OVERRIDE; | 75 virtual void disableEval(const String& errorMessage) OVERRIDE; |
| 76 | 76 |
| 77 WorkerScriptController* script() { return m_script.get(); } | 77 WorkerScriptController* script() { return m_script.get(); } |
| 78 void clearScript() { m_script.clear(); } | 78 void clearScript() { m_script.clear(); } |
| 79 #if ENABLE(INSPECTOR) | |
| 80 void clearInspector(); | 79 void clearInspector(); |
| 81 #endif | |
| 82 | 80 |
| 83 WorkerThread* thread() const { return m_thread; } | 81 WorkerThread* thread() const { return m_thread; } |
| 84 | 82 |
| 85 bool hasPendingActivity() const; | 83 bool hasPendingActivity() const; |
| 86 | 84 |
| 87 virtual void postTask(PassOwnPtr<Task>) OVERRIDE; // Executes the task o
n context's thread asynchronously. | 85 virtual void postTask(PassOwnPtr<Task>) OVERRIDE; // Executes the task o
n context's thread asynchronously. |
| 88 | 86 |
| 89 // WorkerGlobalScope | 87 // WorkerGlobalScope |
| 90 WorkerContext* self() { return this; } | 88 WorkerContext* self() { return this; } |
| 91 WorkerLocation* location() const; | 89 WorkerLocation* location() const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 102 void clearTimeout(int timeoutId); | 100 void clearTimeout(int timeoutId); |
| 103 int setInterval(PassOwnPtr<ScheduledAction>, int timeout); | 101 int setInterval(PassOwnPtr<ScheduledAction>, int timeout); |
| 104 void clearInterval(int timeoutId); | 102 void clearInterval(int timeoutId); |
| 105 | 103 |
| 106 // ScriptExecutionContext | 104 // ScriptExecutionContext |
| 107 virtual WorkerEventQueue* eventQueue() const OVERRIDE; | 105 virtual WorkerEventQueue* eventQueue() const OVERRIDE; |
| 108 | 106 |
| 109 virtual bool isContextThread() const OVERRIDE; | 107 virtual bool isContextThread() const OVERRIDE; |
| 110 virtual bool isJSExecutionForbidden() const OVERRIDE; | 108 virtual bool isJSExecutionForbidden() const OVERRIDE; |
| 111 | 109 |
| 112 #if ENABLE(INSPECTOR) | |
| 113 WorkerInspectorController* workerInspectorController() { return m_worker
InspectorController.get(); } | 110 WorkerInspectorController* workerInspectorController() { return m_worker
InspectorController.get(); } |
| 114 #endif | |
| 115 // These methods are used for GC marking. See JSWorkerContext::visitChil
drenVirtual(SlotVisitor&) in | 111 // These methods are used for GC marking. See JSWorkerContext::visitChil
drenVirtual(SlotVisitor&) in |
| 116 // JSWorkerContextCustom.cpp. | 112 // JSWorkerContextCustom.cpp. |
| 117 WorkerNavigator* optionalNavigator() const { return m_navigator.get(); } | 113 WorkerNavigator* optionalNavigator() const { return m_navigator.get(); } |
| 118 WorkerLocation* optionalLocation() const { return m_location.get(); } | 114 WorkerLocation* optionalLocation() const { return m_location.get(); } |
| 119 | 115 |
| 120 using RefCounted<WorkerContext>::ref; | 116 using RefCounted<WorkerContext>::ref; |
| 121 using RefCounted<WorkerContext>::deref; | 117 using RefCounted<WorkerContext>::deref; |
| 122 | 118 |
| 123 bool isClosing() { return m_closing; } | 119 bool isClosing() { return m_closing; } |
| 124 | 120 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 166 |
| 171 mutable RefPtr<WorkerLocation> m_location; | 167 mutable RefPtr<WorkerLocation> m_location; |
| 172 mutable RefPtr<WorkerNavigator> m_navigator; | 168 mutable RefPtr<WorkerNavigator> m_navigator; |
| 173 | 169 |
| 174 OwnPtr<WorkerScriptController> m_script; | 170 OwnPtr<WorkerScriptController> m_script; |
| 175 WorkerThread* m_thread; | 171 WorkerThread* m_thread; |
| 176 | 172 |
| 177 #if ENABLE(BLOB) | 173 #if ENABLE(BLOB) |
| 178 mutable RefPtr<DOMURL> m_domURL; | 174 mutable RefPtr<DOMURL> m_domURL; |
| 179 #endif | 175 #endif |
| 180 #if ENABLE(INSPECTOR) | |
| 181 OwnPtr<WorkerInspectorController> m_workerInspectorController; | 176 OwnPtr<WorkerInspectorController> m_workerInspectorController; |
| 182 #endif | |
| 183 bool m_closing; | 177 bool m_closing; |
| 184 EventTargetData m_eventTargetData; | 178 EventTargetData m_eventTargetData; |
| 185 | 179 |
| 186 HashSet<Observer*> m_workerObservers; | 180 HashSet<Observer*> m_workerObservers; |
| 187 | 181 |
| 188 OwnPtr<WorkerEventQueue> m_eventQueue; | 182 OwnPtr<WorkerEventQueue> m_eventQueue; |
| 189 | 183 |
| 190 RefPtr<SecurityOrigin> m_topOrigin; | 184 RefPtr<SecurityOrigin> m_topOrigin; |
| 191 }; | 185 }; |
| 192 | 186 |
| 193 } // namespace WebCore | 187 } // namespace WebCore |
| 194 | 188 |
| 195 #endif // ENABLE(WORKERS) | 189 #endif // ENABLE(WORKERS) |
| 196 | 190 |
| 197 #endif // WorkerContext_h | 191 #endif // WorkerContext_h |
| OLD | NEW |