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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 DCHECK(!m_webView); | 280 DCHECK(!m_webView); |
281 m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible); | 281 m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible); |
282 WebSettings* settings = m_webView->settings(); | 282 WebSettings* settings = m_webView->settings(); |
283 // FIXME: http://crbug.com/363843. This needs to find a better way to | 283 // FIXME: http://crbug.com/363843. This needs to find a better way to |
284 // not create graphics layers. | 284 // not create graphics layers. |
285 settings->setAcceleratedCompositingEnabled(false); | 285 settings->setAcceleratedCompositingEnabled(false); |
286 // Currently we block all mixed-content requests from a ServiceWorker. | 286 // Currently we block all mixed-content requests from a ServiceWorker. |
287 // FIXME: When we support FetchEvent.default(), we should relax this | 287 // FIXME: When we support FetchEvent.default(), we should relax this |
288 // restriction. | 288 // restriction. |
289 settings->setStrictMixedContentChecking(true); | 289 settings->setStrictMixedContentChecking(true); |
290 settings->setAllowDisplayOfInsecureContent(false); | |
291 settings->setAllowRunningOfInsecureContent(false); | 290 settings->setAllowRunningOfInsecureContent(false); |
292 settings->setDataSaverEnabled(m_workerStartData.dataSaverEnabled); | 291 settings->setDataSaverEnabled(m_workerStartData.dataSaverEnabled); |
293 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(WebTreeScopeType::Do
cument, this)); | 292 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(WebTreeScopeType::Do
cument, this)); |
294 m_webView->setMainFrame(m_mainFrame.get()); | 293 m_webView->setMainFrame(m_mainFrame.get()); |
295 m_mainFrame->setDevToolsAgentClient(this); | 294 m_mainFrame->setDevToolsAgentClient(this); |
296 | 295 |
297 // If we were asked to wait for debugger then it is the good time to do that
. | 296 // If we were asked to wait for debugger then it is the good time to do that
. |
298 m_workerContextClient->workerReadyForInspection(); | 297 m_workerContextClient->workerReadyForInspection(); |
299 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::Wai
tForDebugger) { | 298 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::Wai
tForDebugger) { |
300 m_waitingForDebuggerState = WaitingForDebugger; | 299 m_waitingForDebuggerState = WaitingForDebugger; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 m_mainThreadTaskRunners = ParentFrameTaskRunners::create(nullptr); | 443 m_mainThreadTaskRunners = ParentFrameTaskRunners::create(nullptr); |
445 | 444 |
446 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); | 445 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); |
447 m_loaderProxy = WorkerLoaderProxy::create(this); | 446 m_loaderProxy = WorkerLoaderProxy::create(this); |
448 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); | 447 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); |
449 m_workerThread->start(std::move(startupData)); | 448 m_workerThread->start(std::move(startupData)); |
450 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); | 449 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); |
451 } | 450 } |
452 | 451 |
453 } // namespace blink | 452 } // namespace blink |
OLD | NEW |