| 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 "modules/serviceworkers/ServiceWorkerThread.h" | 33 #include "modules/serviceworkers/ServiceWorkerThread.h" |
| 34 | 34 |
| 35 #include "core/workers/WorkerThreadStartupData.h" | 35 #include "core/workers/WorkerThreadStartupData.h" |
| 36 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" | 36 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 PassRefPtr<ServiceWorkerThread> ServiceWorkerThread::create(WorkerLoaderProxy& w
orkerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerT
hreadStartupData> startupData) | 40 PassRefPtr<ServiceWorkerThread> ServiceWorkerThread::create(WorkerLoaderProxy& w
orkerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerT
hreadStartupData> startupData) |
| 41 { | 41 { |
| 42 return adoptRef(new ServiceWorkerThread(workerLoaderProxy, workerReportingPr
oxy, startupData)); | 42 // Worker settings has not been passed to ServiceWorker yet. |
| 43 OwnPtr<WorkerSettings> settings = WorkerSettings::create(); |
| 44 return adoptRef(new ServiceWorkerThread(workerLoaderProxy, workerReportingPr
oxy, settings.release(), startupData)); |
| 43 } | 45 } |
| 44 | 46 |
| 45 ServiceWorkerThread::ServiceWorkerThread(WorkerLoaderProxy& workerLoaderProxy, W
orkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> s
tartupData) | 47 ServiceWorkerThread::ServiceWorkerThread(WorkerLoaderProxy& workerLoaderProxy, W
orkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerSettings> settings,
PassOwnPtr<WorkerThreadStartupData> startupData) |
| 46 : WorkerThread(workerLoaderProxy, workerReportingProxy, startupData) | 48 : WorkerThread(workerLoaderProxy, workerReportingProxy, settings, startupDat
a) |
| 47 { | 49 { |
| 48 } | 50 } |
| 49 | 51 |
| 50 ServiceWorkerThread::~ServiceWorkerThread() | 52 ServiceWorkerThread::~ServiceWorkerThread() |
| 51 { | 53 { |
| 52 } | 54 } |
| 53 | 55 |
| 54 PassRefPtr<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(PassO
wnPtr<WorkerThreadStartupData> startupData) | 56 PassRefPtr<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(PassO
wnPtr<WorkerThreadStartupData> startupData) |
| 55 { | 57 { |
| 56 return ServiceWorkerGlobalScope::create(this, startupData); | 58 return ServiceWorkerGlobalScope::create(this, startupData, *settings()); |
| 57 } | 59 } |
| 58 | 60 |
| 59 } // namespace WebCore | 61 } // namespace WebCore |
| OLD | NEW |