| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 267 |
| 268 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() | 268 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() |
| 269 { | 269 { |
| 270 // Create 'shadow page', which is never displayed and is used mainly to | 270 // Create 'shadow page', which is never displayed and is used mainly to |
| 271 // provide a context for loading on the main thread. | 271 // provide a context for loading on the main thread. |
| 272 // | 272 // |
| 273 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. | 273 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. |
| 274 // This code, and probably most of the code in this class should be shared | 274 // This code, and probably most of the code in this class should be shared |
| 275 // with SharedWorker. | 275 // with SharedWorker. |
| 276 DCHECK(!m_webView); | 276 DCHECK(!m_webView); |
| 277 m_webView = WebView::create(0); | 277 m_webView = WebView::create(nullptr, true); |
| 278 WebSettings* settings = m_webView->settings(); | 278 WebSettings* settings = m_webView->settings(); |
| 279 // FIXME: http://crbug.com/363843. This needs to find a better way to | 279 // FIXME: http://crbug.com/363843. This needs to find a better way to |
| 280 // not create graphics layers. | 280 // not create graphics layers. |
| 281 settings->setAcceleratedCompositingEnabled(false); | 281 settings->setAcceleratedCompositingEnabled(false); |
| 282 // Currently we block all mixed-content requests from a ServiceWorker. | 282 // Currently we block all mixed-content requests from a ServiceWorker. |
| 283 // FIXME: When we support FetchEvent.default(), we should relax this | 283 // FIXME: When we support FetchEvent.default(), we should relax this |
| 284 // restriction. | 284 // restriction. |
| 285 settings->setStrictMixedContentChecking(true); | 285 settings->setStrictMixedContentChecking(true); |
| 286 settings->setAllowDisplayOfInsecureContent(false); | 286 settings->setAllowDisplayOfInsecureContent(false); |
| 287 settings->setAllowRunningOfInsecureContent(false); | 287 settings->setAllowRunningOfInsecureContent(false); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 m_mainScriptLoader.clear(); | 425 m_mainScriptLoader.clear(); |
| 426 | 426 |
| 427 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); | 427 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); |
| 428 m_loaderProxy = WorkerLoaderProxy::create(this); | 428 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 429 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); | 429 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); |
| 430 m_workerThread->start(std::move(startupData)); | 430 m_workerThread->start(std::move(startupData)); |
| 431 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); | 431 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); |
| 432 } | 432 } |
| 433 | 433 |
| 434 } // namespace blink | 434 } // namespace blink |
| OLD | NEW |