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