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

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

Issue 1865213006: Replace setIndexedDBClientCreateFunction madness with Supplements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify per review feedback Created 4 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "public/platform/WebMessagePortChannel.h" 60 #include "public/platform/WebMessagePortChannel.h"
61 #include "public/platform/WebString.h" 61 #include "public/platform/WebString.h"
62 #include "public/platform/WebURL.h" 62 #include "public/platform/WebURL.h"
63 #include "public/platform/WebURLRequest.h" 63 #include "public/platform/WebURLRequest.h"
64 #include "public/web/WebDevToolsAgent.h" 64 #include "public/web/WebDevToolsAgent.h"
65 #include "public/web/WebFrame.h" 65 #include "public/web/WebFrame.h"
66 #include "public/web/WebSettings.h" 66 #include "public/web/WebSettings.h"
67 #include "public/web/WebView.h" 67 #include "public/web/WebView.h"
68 #include "public/web/WebWorkerContentSettingsClientProxy.h" 68 #include "public/web/WebWorkerContentSettingsClientProxy.h"
69 #include "public/web/modules/serviceworker/WebServiceWorkerNetworkProvider.h" 69 #include "public/web/modules/serviceworker/WebServiceWorkerNetworkProvider.h"
70 #include "web/IndexedDBClientImpl.h"
70 #include "web/LocalFileSystemClient.h" 71 #include "web/LocalFileSystemClient.h"
71 #include "web/WebDataSourceImpl.h" 72 #include "web/WebDataSourceImpl.h"
72 #include "web/WebLocalFrameImpl.h" 73 #include "web/WebLocalFrameImpl.h"
73 #include "web/WorkerContentSettingsClient.h" 74 #include "web/WorkerContentSettingsClient.h"
74 #include "wtf/Functional.h" 75 #include "wtf/Functional.h"
75 76
76 namespace blink { 77 namespace blink {
77 78
78 // TODO(toyoshim): Share implementation with WebEmbeddedWorkerImpl as much as 79 // TODO(toyoshim): Share implementation with WebEmbeddedWorkerImpl as much as
79 // possible. 80 // possible.
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 321 }
321 322
322 Document* document = m_mainFrame->frame()->document(); 323 Document* document = m_mainFrame->frame()->document();
323 // FIXME: this document's origin is pristine and without any extra privilege s. (crbug.com/254993) 324 // FIXME: this document's origin is pristine and without any extra privilege s. (crbug.com/254993)
324 SecurityOrigin* starterOrigin = document->getSecurityOrigin(); 325 SecurityOrigin* starterOrigin = document->getSecurityOrigin();
325 326
326 WorkerClients* workerClients = WorkerClients::create(); 327 WorkerClients* workerClients = WorkerClients::create();
327 provideLocalFileSystemToWorker(workerClients, LocalFileSystemClient::create( )); 328 provideLocalFileSystemToWorker(workerClients, LocalFileSystemClient::create( ));
328 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->getSecurityOrigin()); 329 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->getSecurityOrigin());
329 provideContentSettingsClientToWorker(workerClients, adoptPtr(m_client->creat eWorkerContentSettingsClientProxy(webSecurityOrigin))); 330 provideContentSettingsClientToWorker(workerClients, adoptPtr(m_client->creat eWorkerContentSettingsClientProxy(webSecurityOrigin)));
331 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create()) ;
330 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo ntentSecurityPolicy(); 332 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo ntentSecurityPolicy();
331 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument); 333 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument);
332 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e( 334 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e(
333 m_url, 335 m_url,
334 m_loadingDocument->userAgent(), 336 m_loadingDocument->userAgent(),
335 m_mainScriptLoader->script(), 337 m_mainScriptLoader->script(),
336 nullptr, 338 nullptr,
337 startMode, 339 startMode,
338 contentSecurityPolicy ? contentSecurityPolicy->headers() : nullptr, 340 contentSecurityPolicy ? contentSecurityPolicy->headers() : nullptr,
339 starterOrigin, 341 starterOrigin,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (devtoolsAgent) 391 if (devtoolsAgent)
390 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); 392 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message);
391 } 393 }
392 394
393 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 395 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
394 { 396 {
395 return new WebSharedWorkerImpl(client); 397 return new WebSharedWorkerImpl(client);
396 } 398 }
397 399
398 } // namespace blink 400 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WorkerContentSettingsClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698