OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google 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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Notify parent that this context is closed. Parent is responsible for
calling WorkerThread::stop(). | 73 // Notify parent that this context is closed. Parent is responsible for
calling WorkerThread::stop(). |
74 workerGlobalScope->thread()->workerReportingProxy().workerGlobalScopeClo
sed(); | 74 workerGlobalScope->thread()->workerReportingProxy().workerGlobalScopeClo
sed(); |
75 } | 75 } |
76 | 76 |
77 virtual bool isCleanupTask() const { return true; } | 77 virtual bool isCleanupTask() const { return true; } |
78 }; | 78 }; |
79 | 79 |
80 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
orkerThread* thread, double timeOrigin, PassOwnPtr<WorkerClients> workerClients) | 80 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
orkerThread* thread, double timeOrigin, PassOwnPtr<WorkerClients> workerClients) |
81 : m_url(url) | 81 : m_url(url) |
82 , m_userAgent(userAgent) | 82 , m_userAgent(userAgent) |
83 , m_script(adoptPtr(new WorkerScriptController(this))) | 83 , m_script(adoptPtr(new WorkerScriptController(*this))) |
84 , m_thread(thread) | 84 , m_thread(thread) |
85 , m_workerInspectorController(adoptPtr(new WorkerInspectorController(this))) | 85 , m_workerInspectorController(adoptPtr(new WorkerInspectorController(this))) |
86 , m_closing(false) | 86 , m_closing(false) |
87 , m_eventQueue(WorkerEventQueue::create(this)) | 87 , m_eventQueue(WorkerEventQueue::create(this)) |
88 , m_timeOrigin(timeOrigin) | 88 , m_timeOrigin(timeOrigin) |
89 , m_workerClients(workerClients) | 89 , m_workerClients(workerClients) |
90 { | 90 { |
91 ScriptWrappable::init(this); | 91 ScriptWrappable::init(this); |
92 setClient(this); | 92 setClient(this); |
93 setSecurityOrigin(SecurityOrigin::create(url)); | 93 setSecurityOrigin(SecurityOrigin::create(url)); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 { | 328 { |
329 return m_eventQueue.get(); | 329 return m_eventQueue.get(); |
330 } | 330 } |
331 | 331 |
332 PassOwnPtr<LifecycleNotifier> WorkerGlobalScope::createLifecycleNotifier() | 332 PassOwnPtr<LifecycleNotifier> WorkerGlobalScope::createLifecycleNotifier() |
333 { | 333 { |
334 return ContextLifecycleNotifier::create(this); | 334 return ContextLifecycleNotifier::create(this); |
335 } | 335 } |
336 | 336 |
337 } // namespace WebCore | 337 } // namespace WebCore |
OLD | NEW |