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

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

Issue 2738133002: Provide an overload to WebView::create that does not require a WebViewClient. (Closed)
Patch Set: Add a derived WebViewClient and use it when no client is passed. Created 3 years, 9 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() { 287 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() {
288 // Create 'shadow page', which is never displayed and is used mainly to 288 // Create 'shadow page', which is never displayed and is used mainly to
289 // provide a context for loading on the main thread. 289 // provide a context for loading on the main thread.
290 // 290 //
291 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. 291 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader.
292 // This code, and probably most of the code in this class should be shared 292 // This code, and probably most of the code in this class should be shared
293 // with SharedWorker. 293 // with SharedWorker.
294 DCHECK(!m_webView); 294 DCHECK(!m_webView);
295 m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible); 295 m_webView = WebView::create(WebPageVisibilityStateVisible);
296 WebSettings* settings = m_webView->settings(); 296 WebSettings* settings = m_webView->settings();
297 // FIXME: http://crbug.com/363843. This needs to find a better way to 297 // FIXME: http://crbug.com/363843. This needs to find a better way to
298 // not create graphics layers. 298 // not create graphics layers.
299 settings->setAcceleratedCompositingEnabled(false); 299 settings->setAcceleratedCompositingEnabled(false);
300 // Currently we block all mixed-content requests from a ServiceWorker. 300 // Currently we block all mixed-content requests from a ServiceWorker.
301 // FIXME: When we support FetchEvent.default(), we should relax this 301 // FIXME: When we support FetchEvent.default(), we should relax this
302 // restriction. 302 // restriction.
303 settings->setStrictMixedContentChecking(true); 303 settings->setStrictMixedContentChecking(true);
304 settings->setAllowRunningOfInsecureContent(false); 304 settings->setAllowRunningOfInsecureContent(false);
305 settings->setDataSaverEnabled(m_workerStartData.dataSaverEnabled); 305 settings->setDataSaverEnabled(m_workerStartData.dataSaverEnabled);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 *this, *document, *m_workerContextClient); 479 *this, *document, *m_workerContextClient);
480 m_loaderProxy = WorkerLoaderProxy::create(this); 480 m_loaderProxy = WorkerLoaderProxy::create(this);
481 m_workerThread = 481 m_workerThread =
482 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); 482 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy);
483 m_workerThread->start(std::move(startupData), m_mainThreadTaskRunners.get()); 483 m_workerThread->start(std::move(startupData), m_mainThreadTaskRunners.get());
484 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), 484 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
485 scriptURL); 485 scriptURL);
486 } 486 }
487 487
488 } // namespace blink 488 } // namespace blink
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698