Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 1708583003: Pass data saver pref value into embedded worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 WebSettings* settings = m_webView->settings(); 222 WebSettings* settings = m_webView->settings();
223 // FIXME: http://crbug.com/363843. This needs to find a better way to 223 // FIXME: http://crbug.com/363843. This needs to find a better way to
224 // not create graphics layers. 224 // not create graphics layers.
225 settings->setAcceleratedCompositingEnabled(false); 225 settings->setAcceleratedCompositingEnabled(false);
226 // Currently we block all mixed-content requests from a ServiceWorker. 226 // Currently we block all mixed-content requests from a ServiceWorker.
227 // FIXME: When we support FetchEvent.default(), we should relax this 227 // FIXME: When we support FetchEvent.default(), we should relax this
228 // restriction. 228 // restriction.
229 settings->setStrictMixedContentChecking(true); 229 settings->setStrictMixedContentChecking(true);
230 settings->setAllowDisplayOfInsecureContent(false); 230 settings->setAllowDisplayOfInsecureContent(false);
231 settings->setAllowRunningOfInsecureContent(false); 231 settings->setAllowRunningOfInsecureContent(false);
232 settings->setDataSaverEnabled(m_workerStartData.dataSaverEnabled);
232 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(WebTreeScopeType::Do cument, this)); 233 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(WebTreeScopeType::Do cument, this));
233 m_webView->setMainFrame(m_mainFrame.get()); 234 m_webView->setMainFrame(m_mainFrame.get());
234 m_mainFrame->setDevToolsAgentClient(this); 235 m_mainFrame->setDevToolsAgentClient(this);
235 236
236 // If we were asked to wait for debugger then it is the good time to do that . 237 // If we were asked to wait for debugger then it is the good time to do that .
237 m_workerContextClient->workerReadyForInspection(); 238 m_workerContextClient->workerReadyForInspection();
238 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::Wai tForDebugger) { 239 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::Wai tForDebugger) {
239 m_waitingForDebuggerState = WaitingForDebuggerBeforeLoadingScript; 240 m_waitingForDebuggerState = WaitingForDebuggerBeforeLoadingScript;
240 return; 241 return;
241 } 242 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 m_mainScriptLoader.clear(); 357 m_mainScriptLoader.clear();
357 358
358 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 359 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
359 m_loaderProxy = WorkerLoaderProxy::create(this); 360 m_loaderProxy = WorkerLoaderProxy::create(this);
360 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 361 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
361 m_workerThread->start(startupData.release()); 362 m_workerThread->start(startupData.release());
362 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 363 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
363 } 364 }
364 365
365 } // namespace blink 366 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698