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