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

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

Issue 2614143002: Use a new Supplement constructor for LocalFrame's supplements (Closed)
Patch Set: Created 3 years, 11 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 Document* document = m_mainFrame->frame()->document(); 419 Document* document = m_mainFrame->frame()->document();
420 420
421 // FIXME: this document's origin is pristine and without any extra privileges. 421 // FIXME: this document's origin is pristine and without any extra privileges.
422 // (crbug.com/254993) 422 // (crbug.com/254993)
423 SecurityOrigin* starterOrigin = document->getSecurityOrigin(); 423 SecurityOrigin* starterOrigin = document->getSecurityOrigin();
424 424
425 WorkerClients* workerClients = WorkerClients::create(); 425 WorkerClients* workerClients = WorkerClients::create();
426 provideContentSettingsClientToWorker(workerClients, 426 provideContentSettingsClientToWorker(workerClients,
427 std::move(m_contentSettingsClient)); 427 std::move(m_contentSettingsClient));
428 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create()); 428 provideIndexedDBClientToWorker(workerClients,
429 IndexedDBClientImpl::create(*workerClients));
429 provideServiceWorkerGlobalScopeClientToWorker( 430 provideServiceWorkerGlobalScopeClientToWorker(
430 workerClients, 431 workerClients,
431 ServiceWorkerGlobalScopeClientImpl::create(*m_workerContextClient)); 432 ServiceWorkerGlobalScopeClientImpl::create(*m_workerContextClient));
432 provideServiceWorkerContainerClientToWorker( 433 provideServiceWorkerContainerClientToWorker(
433 workerClients, 434 workerClients,
434 WTF::wrapUnique(m_workerContextClient->createServiceWorkerProvider())); 435 WTF::wrapUnique(m_workerContextClient->createServiceWorkerProvider()));
435 436
436 // We need to set the CSP to both the shadow page's document and the 437 // We need to set the CSP to both the shadow page's document and the
437 // ServiceWorkerGlobalScope. 438 // ServiceWorkerGlobalScope.
438 document->initContentSecurityPolicy( 439 document->initContentSecurityPolicy(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 *this, *document, *m_workerContextClient); 471 *this, *document, *m_workerContextClient);
471 m_loaderProxy = WorkerLoaderProxy::create(this); 472 m_loaderProxy = WorkerLoaderProxy::create(this);
472 m_workerThread = 473 m_workerThread =
473 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); 474 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy);
474 m_workerThread->start(std::move(startupData)); 475 m_workerThread->start(std::move(startupData));
475 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), 476 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
476 scriptURL); 477 scriptURL);
477 } 478 }
478 479
479 } // namespace blink 480 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698