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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 private: | 128 private: |
129 WorkerContext* m_context; | 129 WorkerContext* m_context; |
130 }; | 130 }; |
131 friend class Observer; | 131 friend class Observer; |
132 void registerObserver(Observer*); | 132 void registerObserver(Observer*); |
133 void unregisterObserver(Observer*); | 133 void unregisterObserver(Observer*); |
134 void notifyObserversOfStop(); | 134 void notifyObserversOfStop(); |
135 | 135 |
136 virtual const SecurityOrigin* topOrigin() const OVERRIDE { return m_topO
rigin.get(); } | 136 virtual const SecurityOrigin* topOrigin() const OVERRIDE { return m_topO
rigin.get(); } |
137 | 137 |
| 138 double timeOrigin() const { return m_timeOrigin; } |
| 139 |
138 protected: | 140 protected: |
139 WorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSett
ings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin); | 141 WorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSett
ings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin, double timeOrigin); |
140 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicy::HeaderType); | 142 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicy::HeaderType); |
141 | 143 |
142 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE; | 144 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE; |
143 void addMessageToWorkerConsole(MessageSource, MessageLevel, const String
& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallSt
ack>, ScriptState* = 0, unsigned long requestIdentifier = 0); | 145 void addMessageToWorkerConsole(MessageSource, MessageLevel, const String
& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallSt
ack>, ScriptState* = 0, unsigned long requestIdentifier = 0); |
144 | 146 |
145 private: | 147 private: |
146 virtual void refScriptExecutionContext() OVERRIDE { ref(); } | 148 virtual void refScriptExecutionContext() OVERRIDE { ref(); } |
147 virtual void derefScriptExecutionContext() OVERRIDE { deref(); } | 149 virtual void derefScriptExecutionContext() OVERRIDE { deref(); } |
148 | 150 |
149 virtual void refEventTarget() OVERRIDE { ref(); } | 151 virtual void refEventTarget() OVERRIDE { ref(); } |
(...skipping 22 matching lines...) Expand all Loading... |
172 mutable RefPtr<DOMURL> m_domURL; | 174 mutable RefPtr<DOMURL> m_domURL; |
173 OwnPtr<WorkerInspectorController> m_workerInspectorController; | 175 OwnPtr<WorkerInspectorController> m_workerInspectorController; |
174 bool m_closing; | 176 bool m_closing; |
175 EventTargetData m_eventTargetData; | 177 EventTargetData m_eventTargetData; |
176 | 178 |
177 HashSet<Observer*> m_workerObservers; | 179 HashSet<Observer*> m_workerObservers; |
178 | 180 |
179 OwnPtr<WorkerEventQueue> m_eventQueue; | 181 OwnPtr<WorkerEventQueue> m_eventQueue; |
180 | 182 |
181 RefPtr<SecurityOrigin> m_topOrigin; | 183 RefPtr<SecurityOrigin> m_topOrigin; |
| 184 |
| 185 double m_timeOrigin; |
182 }; | 186 }; |
183 | 187 |
184 } // namespace WebCore | 188 } // namespace WebCore |
185 | 189 |
186 #endif // WorkerContext_h | 190 #endif // WorkerContext_h |
OLD | NEW |