OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "bindings/v8/ScriptObject.h" | 33 #include "bindings/v8/ScriptObject.h" |
34 #include "core/workers/WorkerClients.h" | 34 #include "core/workers/WorkerClients.h" |
35 #include "core/workers/WorkerThreadStartupData.h" | 35 #include "core/workers/WorkerThreadStartupData.h" |
36 #include "modules/serviceworkers/ServiceWorkerThread.h" | 36 #include "modules/serviceworkers/ServiceWorkerThread.h" |
37 #include "platform/weborigin/KURL.h" | 37 #include "platform/weborigin/KURL.h" |
38 #include "wtf/CurrentTime.h" | 38 #include "wtf/CurrentTime.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 PassRefPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::create(ServiceWor
kerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData) | 42 PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::creat
e(ServiceWorkerThread* thread, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> s
tartupData) |
43 { | 43 { |
44 RefPtr<ServiceWorkerGlobalScope> context = adoptRef(new ServiceWorkerGlobalS
cope(startupData->m_scriptURL, startupData->m_userAgent, thread, monotonicallyIn
creasingTime(), startupData->m_workerClients.release())); | 44 RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefCountedWillBe
RefCountedGarbageCollected(new ServiceWorkerGlobalScope(startupData->m_scriptURL
, startupData->m_userAgent, thread, monotonicallyIncreasingTime(), startupData->
m_workerClients.release())); |
45 | 45 |
46 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity
Policy, startupData->m_contentSecurityPolicyType); | 46 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity
Policy, startupData->m_contentSecurityPolicyType); |
47 return context.release(); | 47 return context.release(); |
48 } | 48 } |
49 | 49 |
50 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<WorkerCl
ients> workerClients) : | 50 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String
& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<WorkerCl
ients> workerClients) : |
51 WorkerGlobalScope(url, userAgent, thread, timeOrigin, workerClients) | 51 WorkerGlobalScope(url, userAgent, thread, timeOrigin, workerClients) |
52 { | 52 { |
53 ScriptWrappable::init(this); | 53 ScriptWrappable::init(this); |
54 } | 54 } |
55 | 55 |
56 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() | 56 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const | 60 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const |
61 { | 61 { |
62 return EventTargetNames::ServiceWorkerGlobalScope; | 62 return EventTargetNames::ServiceWorkerGlobalScope; |
63 } | 63 } |
64 | 64 |
65 } // namespace WebCore | 65 } // namespace WebCore |
OLD | NEW |