Commit 59f18496 authored by Sasha Bermeister's avatar Sasha Bermeister Committed by Commit Bot

Move WebSharedWorkerImpl to core/exported

Move WebSharedWorkerImpl to core/exported, which requires adding a
callback inside ModulesInitializer to create objects for various
classes in modules/ (LocalFileSystemClient and IndexedDBClient, and
moving both Impl files to modules/ as well). Also added a Create()
method for WebLocalFrame to WebFactory, and minor other required
changes.

This change moves the following classes out of web/:
- WebSharedWorkerImpl -> core/exported
- WebSharedWorkerReportingProxyImpl -> core/workers
- LocalFileSystemClient -> modules/filesystem
- IndexedDBClientImpl -> modules/indexeddb

Bug: 712963
Change-Id: I44b83f02342f179a71fdb15c0f889a0ab41dc878
Reviewed-on: https://chromium-review.googlesource.com/522503
Commit-Queue: Sasha Morrissey <sashab@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477575}
parent ada6aaf7
...@@ -60,6 +60,8 @@ blink_core_sources("exported") { ...@@ -60,6 +60,8 @@ blink_core_sources("exported") {
"WebSerializedScriptValue.cpp", "WebSerializedScriptValue.cpp",
"WebSettingsImpl.cpp", "WebSettingsImpl.cpp",
"WebSettingsImpl.h", "WebSettingsImpl.h",
"WebSharedWorkerImpl.cpp",
"WebSharedWorkerImpl.h",
"WebTextCheckingCompletionImpl.cpp", "WebTextCheckingCompletionImpl.cpp",
"WebTextCheckingCompletionImpl.h", "WebTextCheckingCompletionImpl.h",
"WebTextCheckingResult.cpp", "WebTextCheckingResult.cpp",
......
...@@ -12,7 +12,13 @@ namespace blink { ...@@ -12,7 +12,13 @@ namespace blink {
class ChromeClient; class ChromeClient;
class WebViewBase; class WebViewBase;
class WebLocalFrameBase;
class WebViewClient; class WebViewClient;
class WebFrameClient;
class InterfaceProvider;
class InterfaceRegistry;
class WebFrame;
enum class WebTreeScopeType;
// WebFactory is a temporary class implemented in web/ that allows classes to // WebFactory is a temporary class implemented in web/ that allows classes to
// construct interfaces that are being moved out of web/. // construct interfaces that are being moved out of web/.
...@@ -24,6 +30,12 @@ class CORE_EXPORT WebFactory { ...@@ -24,6 +30,12 @@ class CORE_EXPORT WebFactory {
virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0;
virtual WebViewBase* CreateWebViewBase(WebViewClient*, virtual WebViewBase* CreateWebViewBase(WebViewClient*,
WebPageVisibilityState) const = 0; WebPageVisibilityState) const = 0;
virtual WebLocalFrameBase* CreateWebLocalFrameBase(
WebTreeScopeType,
WebFrameClient*,
blink::InterfaceProvider*,
blink::InterfaceRegistry*,
WebFrame* opener = nullptr) const = 0;
protected: protected:
// Takes ownership of |factory|. // Takes ownership of |factory|.
......
...@@ -28,13 +28,15 @@ ...@@ -28,13 +28,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "web/WebSharedWorkerImpl.h" #include "core/exported/WebSharedWorkerImpl.h"
#include <memory> #include <memory>
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/dom/TaskRunnerHelper.h" #include "core/dom/TaskRunnerHelper.h"
#include "core/events/MessageEvent.h" #include "core/events/MessageEvent.h"
#include "core/exported/WebDataSourceImpl.h" #include "core/exported/WebDataSourceImpl.h"
#include "core/exported/WebFactory.h"
#include "core/exported/WebViewBase.h"
#include "core/frame/WebLocalFrameBase.h" #include "core/frame/WebLocalFrameBase.h"
#include "core/inspector/ConsoleMessage.h" #include "core/inspector/ConsoleMessage.h"
#include "core/loader/FrameLoadRequest.h" #include "core/loader/FrameLoadRequest.h"
...@@ -73,11 +75,21 @@ ...@@ -73,11 +75,21 @@
#include "public/web/WebSettings.h" #include "public/web/WebSettings.h"
#include "public/web/WebView.h" #include "public/web/WebView.h"
#include "public/web/WebWorkerContentSettingsClientProxy.h" #include "public/web/WebWorkerContentSettingsClientProxy.h"
#include "web/IndexedDBClientImpl.h"
#include "web/LocalFileSystemClient.h"
namespace blink { namespace blink {
namespace {
// Vector of callbacks for the OnScriptLoaderFinished method.
using WorkerClientsCreatedCallbackVector =
WTF::Vector<WebSharedWorkerImpl::WorkerClientsCreatedCallback>;
WorkerClientsCreatedCallbackVector& GetWorkerClientsCreatedCallbackVector() {
DEFINE_STATIC_LOCAL(WorkerClientsCreatedCallbackVector, callback_vector, ());
return callback_vector;
}
} // namespace
// TODO(toyoshim): Share implementation with WebEmbeddedWorkerImpl as much as // TODO(toyoshim): Share implementation with WebEmbeddedWorkerImpl as much as
// possible. // possible.
...@@ -127,7 +139,8 @@ void WebSharedWorkerImpl::InitializeLoader(bool data_saver_enabled) { ...@@ -127,7 +139,8 @@ void WebSharedWorkerImpl::InitializeLoader(bool data_saver_enabled) {
// loading requests from the worker context to the rest of WebKit and Chromium // loading requests from the worker context to the rest of WebKit and Chromium
// infrastructure. // infrastructure.
DCHECK(!web_view_); DCHECK(!web_view_);
web_view_ = WebView::Create(nullptr, kWebPageVisibilityStateVisible); web_view_ = WebFactory::GetInstance().CreateWebViewBase(
nullptr, kWebPageVisibilityStateVisible);
// FIXME: http://crbug.com/363843. This needs to find a better way to // FIXME: http://crbug.com/363843. This needs to find a better way to
// not create graphics layers. // not create graphics layers.
web_view_->GetSettings()->SetAcceleratedCompositingEnabled(false); web_view_->GetSettings()->SetAcceleratedCompositingEnabled(false);
...@@ -135,9 +148,9 @@ void WebSharedWorkerImpl::InitializeLoader(bool data_saver_enabled) { ...@@ -135,9 +148,9 @@ void WebSharedWorkerImpl::InitializeLoader(bool data_saver_enabled) {
// FIXME: Settings information should be passed to the Worker process from // FIXME: Settings information should be passed to the Worker process from
// Browser process when the worker is created (similar to // Browser process when the worker is created (similar to
// RenderThread::OnCreateNewView). // RenderThread::OnCreateNewView).
main_frame_ = ToWebLocalFrameBase(WebLocalFrame::Create( main_frame_ = WebFactory::GetInstance().CreateWebLocalFrameBase(
WebTreeScopeType::kDocument, this, WebTreeScopeType::kDocument, this,
Platform::Current()->GetInterfaceProvider(), nullptr)); Platform::Current()->GetInterfaceProvider(), nullptr);
web_view_->SetMainFrame(main_frame_.Get()); web_view_->SetMainFrame(main_frame_.Get());
main_frame_->SetDevToolsAgentClient(this); main_frame_->SetDevToolsAgentClient(this);
...@@ -250,6 +263,11 @@ void WebSharedWorkerImpl::DidTerminateWorkerThread() { ...@@ -250,6 +263,11 @@ void WebSharedWorkerImpl::DidTerminateWorkerThread() {
delete this; delete this;
} }
void WebSharedWorkerImpl::RegisterWorkerClientsCreatedCallback(
WorkerClientsCreatedCallback callback) {
GetWorkerClientsCreatedCallbackVector().push_back(callback);
}
void WebSharedWorkerImpl::Connect( void WebSharedWorkerImpl::Connect(
std::unique_ptr<WebMessagePortChannel> web_channel) { std::unique_ptr<WebMessagePortChannel> web_channel) {
DCHECK(IsMainThread()); DCHECK(IsMainThread());
...@@ -320,15 +338,16 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() { ...@@ -320,15 +338,16 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() {
SecurityOrigin* starter_origin = loading_document_->GetSecurityOrigin(); SecurityOrigin* starter_origin = loading_document_->GetSecurityOrigin();
WorkerClients* worker_clients = WorkerClients::Create(); WorkerClients* worker_clients = WorkerClients::Create();
ProvideLocalFileSystemToWorker(worker_clients, DCHECK(!GetWorkerClientsCreatedCallbackVector().IsEmpty());
LocalFileSystemClient::Create()); for (auto& callback : GetWorkerClientsCreatedCallbackVector()) {
callback(worker_clients);
}
WebSecurityOrigin web_security_origin(loading_document_->GetSecurityOrigin()); WebSecurityOrigin web_security_origin(loading_document_->GetSecurityOrigin());
ProvideContentSettingsClientToWorker( ProvideContentSettingsClientToWorker(
worker_clients, worker_clients,
WTF::WrapUnique(client_->CreateWorkerContentSettingsClientProxy( WTF::WrapUnique(client_->CreateWorkerContentSettingsClientProxy(
web_security_origin))); web_security_origin)));
ProvideIndexedDBClientToWorker(worker_clients,
IndexedDBClientImpl::Create(*worker_clients));
if (RuntimeEnabledFeatures::OffMainThreadFetchEnabled()) { if (RuntimeEnabledFeatures::OffMainThreadFetchEnabled()) {
std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context = std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
...@@ -427,9 +446,10 @@ void WebSharedWorkerImpl::DispatchDevToolsMessage(int session_id, ...@@ -427,9 +446,10 @@ void WebSharedWorkerImpl::DispatchDevToolsMessage(int session_id,
if (asked_to_terminate_) if (asked_to_terminate_)
return; return;
WebDevToolsAgent* devtools_agent = main_frame_->DevToolsAgent(); WebDevToolsAgent* devtools_agent = main_frame_->DevToolsAgent();
if (devtools_agent) if (devtools_agent) {
devtools_agent->DispatchOnInspectorBackend(session_id, call_id, method, devtools_agent->DispatchOnInspectorBackend(session_id, call_id, method,
message); message);
}
} }
WebSharedWorker* WebSharedWorker::Create(WebSharedWorkerClient* client) { WebSharedWorker* WebSharedWorker::Create(WebSharedWorkerClient* client) {
......
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
#include "public/web/WebSharedWorker.h" #include "public/web/WebSharedWorker.h"
#include <memory> #include <memory>
#include "core/CoreExport.h"
#include "core/dom/ExecutionContext.h" #include "core/dom/ExecutionContext.h"
#include "core/workers/WebSharedWorkerReportingProxyImpl.h"
#include "core/workers/WorkerThread.h" #include "core/workers/WorkerThread.h"
#include "platform/wtf/RefPtr.h" #include "platform/wtf/RefPtr.h"
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
...@@ -43,7 +45,6 @@ ...@@ -43,7 +45,6 @@
#include "public/web/WebDevToolsAgentClient.h" #include "public/web/WebDevToolsAgentClient.h"
#include "public/web/WebFrameClient.h" #include "public/web/WebFrameClient.h"
#include "public/web/WebSharedWorkerClient.h" #include "public/web/WebSharedWorkerClient.h"
#include "web/WebSharedWorkerReportingProxyImpl.h"
namespace blink { namespace blink {
...@@ -55,6 +56,7 @@ class WebSharedWorkerClient; ...@@ -55,6 +56,7 @@ class WebSharedWorkerClient;
class WebString; class WebString;
class WebURL; class WebURL;
class WebView; class WebView;
class WorkerClients;
class WorkerInspectorProxy; class WorkerInspectorProxy;
class WorkerScriptLoader; class WorkerScriptLoader;
...@@ -115,6 +117,14 @@ class WebSharedWorkerImpl final : public WebFrameClient, ...@@ -115,6 +117,14 @@ class WebSharedWorkerImpl final : public WebFrameClient,
void DidCloseWorkerGlobalScope(); void DidCloseWorkerGlobalScope();
void DidTerminateWorkerThread(); void DidTerminateWorkerThread();
using WorkerClientsCreatedCallback = void (*)(WorkerClients*);
// Allows for the registration of a callback that is invoked whenever a new
// OnScriptLoaderFinished is called. Callbacks are executed in the order that
// they were added using RegisterWorkerClientsCreatedCallback, and there are
// no checks for adding a callback multiple times.
CORE_EXPORT static void RegisterWorkerClientsCreatedCallback(
WorkerClientsCreatedCallback);
private: private:
~WebSharedWorkerImpl() override; ~WebSharedWorkerImpl() override;
......
...@@ -45,6 +45,8 @@ blink_core_sources("workers") { ...@@ -45,6 +45,8 @@ blink_core_sources("workers") {
"ThreadedWorkletMessagingProxy.h", "ThreadedWorkletMessagingProxy.h",
"ThreadedWorkletObjectProxy.cpp", "ThreadedWorkletObjectProxy.cpp",
"ThreadedWorkletObjectProxy.h", "ThreadedWorkletObjectProxy.h",
"WebSharedWorkerReportingProxyImpl.cpp",
"WebSharedWorkerReportingProxyImpl.h",
"Worker.cpp", "Worker.cpp",
"Worker.h", "Worker.h",
"WorkerBackingThread.cpp", "WorkerBackingThread.cpp",
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "web/WebSharedWorkerReportingProxyImpl.h" #include "core/workers/WebSharedWorkerReportingProxyImpl.h"
#include "bindings/core/v8/SourceLocation.h" #include "bindings/core/v8/SourceLocation.h"
#include "core/exported/WebSharedWorkerImpl.h"
#include "platform/CrossThreadFunctional.h" #include "platform/CrossThreadFunctional.h"
#include "platform/wtf/WTF.h" #include "platform/wtf/WTF.h"
#include "public/platform/WebTraceLocation.h" #include "public/platform/WebTraceLocation.h"
#include "web/WebSharedWorkerImpl.h"
namespace blink { namespace blink {
......
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
#include "core/EventTypeNames.h" #include "core/EventTypeNames.h"
#include "core/css/CSSPaintImageGenerator.h" #include "core/css/CSSPaintImageGenerator.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/exported/WebSharedWorkerImpl.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/html/HTMLCanvasElement.h" #include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLMediaElement.h" #include "core/html/HTMLMediaElement.h"
#include "core/offscreencanvas/OffscreenCanvas.h" #include "core/offscreencanvas/OffscreenCanvas.h"
#include "core/workers/WorkerContentSettingsClient.h"
#include "modules/EventModulesFactory.h" #include "modules/EventModulesFactory.h"
#include "modules/EventModulesNames.h" #include "modules/EventModulesNames.h"
#include "modules/EventTargetModulesNames.h" #include "modules/EventTargetModulesNames.h"
...@@ -23,7 +25,9 @@ ...@@ -23,7 +25,9 @@
#include "modules/csspaint/CSSPaintImageGeneratorImpl.h" #include "modules/csspaint/CSSPaintImageGeneratorImpl.h"
#include "modules/document_metadata/CopylessPasteServer.h" #include "modules/document_metadata/CopylessPasteServer.h"
#include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h"
#include "modules/filesystem/LocalFileSystemClient.h"
#include "modules/imagebitmap/ImageBitmapRenderingContext.h" #include "modules/imagebitmap/ImageBitmapRenderingContext.h"
#include "modules/indexeddb/IndexedDBClientImpl.h"
#include "modules/installation/InstallationServiceImpl.h" #include "modules/installation/InstallationServiceImpl.h"
#include "modules/media_controls/MediaControlsImpl.h" #include "modules/media_controls/MediaControlsImpl.h"
#include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h"
...@@ -34,6 +38,8 @@ ...@@ -34,6 +38,8 @@
#include "platform/mojo/MojoHelper.h" #include "platform/mojo/MojoHelper.h"
#include "platform/wtf/PtrUtil.h" #include "platform/wtf/PtrUtil.h"
#include "public/platform/InterfaceRegistry.h" #include "public/platform/InterfaceRegistry.h"
#include "public/platform/WebSecurityOrigin.h"
#include "public/web/WebWorkerContentSettingsClientProxy.h"
namespace blink { namespace blink {
...@@ -97,6 +103,17 @@ void ModulesInitializer::Initialize() { ...@@ -97,6 +103,17 @@ void ModulesInitializer::Initialize() {
&AppBannerController::BindMojoRequest, WrapWeakPersistent(frame))); &AppBannerController::BindMojoRequest, WrapWeakPersistent(frame)));
}); });
// WebSharedWorkerImpl callbacks for modules initialization.
// TODO(nhiroki): Implement a common mechanism to set up WorkerClients
// (https://crbug.com/729500).
WebSharedWorkerImpl::RegisterWorkerClientsCreatedCallback(
[](WorkerClients* worker_clients) {
ProvideLocalFileSystemToWorker(worker_clients,
LocalFileSystemClient::Create());
ProvideIndexedDBClientToWorker(
worker_clients, IndexedDBClientImpl::Create(*worker_clients));
});
HTMLMediaElement::RegisterMediaControlsFactory( HTMLMediaElement::RegisterMediaControlsFactory(
WTF::MakeUnique<MediaControlsImpl::Factory>()); WTF::MakeUnique<MediaControlsImpl::Factory>());
......
...@@ -60,6 +60,8 @@ blink_modules_sources("filesystem") { ...@@ -60,6 +60,8 @@ blink_modules_sources("filesystem") {
"HTMLInputElementFileSystem.h", "HTMLInputElementFileSystem.h",
"LocalFileSystem.cpp", "LocalFileSystem.cpp",
"LocalFileSystem.h", "LocalFileSystem.h",
"LocalFileSystemClient.cpp",
"LocalFileSystemClient.h",
"Metadata.h", "Metadata.h",
"MetadataCallback.h", "MetadataCallback.h",
"SyncCallbackHelper.h", "SyncCallbackHelper.h",
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "web/LocalFileSystemClient.h" #include "modules/filesystem/LocalFileSystemClient.h"
#include <memory> #include <memory>
#include "core/dom/Document.h" #include "core/dom/Document.h"
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define LocalFileSystemClient_h #define LocalFileSystemClient_h
#include <memory> #include <memory>
#include "modules/ModulesExport.h"
#include "modules/filesystem/FileSystemClient.h" #include "modules/filesystem/FileSystemClient.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
...@@ -39,7 +40,7 @@ namespace blink { ...@@ -39,7 +40,7 @@ namespace blink {
class LocalFileSystemClient final : public FileSystemClient { class LocalFileSystemClient final : public FileSystemClient {
public: public:
static std::unique_ptr<FileSystemClient> Create(); MODULES_EXPORT static std::unique_ptr<FileSystemClient> Create();
~LocalFileSystemClient() override; ~LocalFileSystemClient() override;
......
...@@ -61,6 +61,8 @@ blink_modules_sources("indexeddb") { ...@@ -61,6 +61,8 @@ blink_modules_sources("indexeddb") {
"IndexedDB.h", "IndexedDB.h",
"IndexedDBClient.cpp", "IndexedDBClient.cpp",
"IndexedDBClient.h", "IndexedDBClient.h",
"IndexedDBClientImpl.cpp",
"IndexedDBClientImpl.h",
"InspectorIndexedDBAgent.cpp", "InspectorIndexedDBAgent.cpp",
"InspectorIndexedDBAgent.h", "InspectorIndexedDBAgent.h",
"WebIDBCallbacksImpl.cpp", "WebIDBCallbacksImpl.cpp",
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "web/IndexedDBClientImpl.h" #include "modules/indexeddb/IndexedDBClientImpl.h"
#include "bindings/core/v8/WorkerOrWorkletScriptController.h" #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#ifndef IndexedDBClientImpl_h #ifndef IndexedDBClientImpl_h
#define IndexedDBClientImpl_h #define IndexedDBClientImpl_h
#include "modules/ModulesExport.h"
#include "modules/indexeddb/IndexedDBClient.h" #include "modules/indexeddb/IndexedDBClient.h"
namespace blink { namespace blink {
...@@ -42,8 +43,8 @@ class ExecutionContext; ...@@ -42,8 +43,8 @@ class ExecutionContext;
// for the main thread. // for the main thread.
class IndexedDBClientImpl final : public IndexedDBClient { class IndexedDBClientImpl final : public IndexedDBClient {
public: public:
static IndexedDBClient* Create(LocalFrame&); MODULES_EXPORT static IndexedDBClient* Create(LocalFrame&);
static IndexedDBClient* Create(WorkerClients&); MODULES_EXPORT static IndexedDBClient* Create(WorkerClients&);
bool AllowIndexedDB(ExecutionContext*, const String& name) override; bool AllowIndexedDB(ExecutionContext*, const String& name) override;
......
...@@ -55,14 +55,10 @@ component("web") { ...@@ -55,14 +55,10 @@ component("web") {
"ExternalPopupMenu.h", "ExternalPopupMenu.h",
"FullscreenController.cpp", "FullscreenController.cpp",
"FullscreenController.h", "FullscreenController.h",
"IndexedDBClientImpl.cpp",
"IndexedDBClientImpl.h",
"InspectorOverlayAgent.cpp", "InspectorOverlayAgent.cpp",
"InspectorOverlayAgent.h", "InspectorOverlayAgent.h",
"LinkHighlightImpl.cpp", "LinkHighlightImpl.cpp",
"LinkHighlightImpl.h", "LinkHighlightImpl.h",
"LocalFileSystemClient.cpp",
"LocalFileSystemClient.h",
"LocalFrameClientImpl.cpp", "LocalFrameClientImpl.cpp",
"LocalFrameClientImpl.h", "LocalFrameClientImpl.h",
"MediaKeysClientImpl.cpp", "MediaKeysClientImpl.cpp",
...@@ -134,10 +130,6 @@ component("web") { ...@@ -134,10 +130,6 @@ component("web") {
"WebRemoteFrameImpl.h", "WebRemoteFrameImpl.h",
"WebScopedWindowFocusAllowedIndicator.cpp", "WebScopedWindowFocusAllowedIndicator.cpp",
"WebSearchableFormData.cpp", "WebSearchableFormData.cpp",
"WebSharedWorkerImpl.cpp",
"WebSharedWorkerImpl.h",
"WebSharedWorkerReportingProxyImpl.cpp",
"WebSharedWorkerReportingProxyImpl.h",
"WebSurroundingText.cpp", "WebSurroundingText.cpp",
"WebViewImpl.cpp", "WebViewImpl.cpp",
"WebViewImpl.h", "WebViewImpl.h",
......
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
#include "modules/accessibility/AXObjectImpl.h" #include "modules/accessibility/AXObjectImpl.h"
#include "modules/audio_output_devices/AudioOutputDeviceClient.h" #include "modules/audio_output_devices/AudioOutputDeviceClient.h"
#include "modules/audio_output_devices/AudioOutputDeviceClientImpl.h" #include "modules/audio_output_devices/AudioOutputDeviceClientImpl.h"
#include "modules/filesystem/LocalFileSystemClient.h"
#include "modules/indexeddb/IndexedDBClientImpl.h"
#include "modules/installedapp/InstalledAppController.h" #include "modules/installedapp/InstalledAppController.h"
#include "modules/mediastream/UserMediaController.h" #include "modules/mediastream/UserMediaController.h"
#include "modules/navigatorcontentutils/NavigatorContentUtils.h" #include "modules/navigatorcontentutils/NavigatorContentUtils.h"
...@@ -117,8 +119,6 @@ ...@@ -117,8 +119,6 @@
#include "web/ColorChooserUIController.h" #include "web/ColorChooserUIController.h"
#include "web/ExternalDateTimeChooser.h" #include "web/ExternalDateTimeChooser.h"
#include "web/ExternalPopupMenu.h" #include "web/ExternalPopupMenu.h"
#include "web/IndexedDBClientImpl.h"
#include "web/LocalFileSystemClient.h"
#include "web/NavigatorContentUtilsClientImpl.h" #include "web/NavigatorContentUtilsClientImpl.h"
#include "web/PopupMenuImpl.h" #include "web/PopupMenuImpl.h"
#include "web/WebFrameWidgetImpl.h" #include "web/WebFrameWidgetImpl.h"
......
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
#include "core/workers/Worker.h" #include "core/workers/Worker.h"
#include "core/workers/WorkerClients.h" #include "core/workers/WorkerClients.h"
#include "core/workers/WorkerContentSettingsClient.h" #include "core/workers/WorkerContentSettingsClient.h"
#include "modules/filesystem/LocalFileSystemClient.h"
#include "modules/indexeddb/IndexedDBClientImpl.h"
#include "platform/wtf/PtrUtil.h" #include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
#include "public/platform/WebContentSettingsClient.h" #include "public/platform/WebContentSettingsClient.h"
#include "public/platform/WebString.h" #include "public/platform/WebString.h"
#include "public/web/WebFrameClient.h" #include "public/web/WebFrameClient.h"
#include "public/web/WebWorkerContentSettingsClientProxy.h" #include "public/web/WebWorkerContentSettingsClientProxy.h"
#include "web/IndexedDBClientImpl.h"
#include "web/LocalFileSystemClient.h"
namespace blink { namespace blink {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "core/workers/WorkerInspectorProxy.h" #include "core/workers/WorkerInspectorProxy.h"
#include "core/workers/WorkerScriptLoader.h" #include "core/workers/WorkerScriptLoader.h"
#include "core/workers/WorkerThreadStartupData.h" #include "core/workers/WorkerThreadStartupData.h"
#include "modules/indexeddb/IndexedDBClientImpl.h"
#include "modules/serviceworkers/ServiceWorkerContainerClient.h" #include "modules/serviceworkers/ServiceWorkerContainerClient.h"
#include "modules/serviceworkers/ServiceWorkerThread.h" #include "modules/serviceworkers/ServiceWorkerThread.h"
#include "platform/Histogram.h" #include "platform/Histogram.h"
...@@ -74,7 +75,6 @@ ...@@ -74,7 +75,6 @@
#include "public/web/WebView.h" #include "public/web/WebView.h"
#include "public/web/WebWorkerContentSettingsClientProxy.h" #include "public/web/WebWorkerContentSettingsClientProxy.h"
#include "public/web/modules/serviceworker/WebServiceWorkerContextClient.h" #include "public/web/modules/serviceworker/WebServiceWorkerContextClient.h"
#include "web/IndexedDBClientImpl.h"
#include "web/ServiceWorkerGlobalScopeClientImpl.h" #include "web/ServiceWorkerGlobalScopeClientImpl.h"
#include "web/ServiceWorkerGlobalScopeProxy.h" #include "web/ServiceWorkerGlobalScopeProxy.h"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "web/WebFactoryImpl.h" #include "web/WebFactoryImpl.h"
#include "web/ChromeClientImpl.h" #include "web/ChromeClientImpl.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebViewImpl.h" #include "web/WebViewImpl.h"
namespace blink { namespace blink {
...@@ -21,4 +22,13 @@ WebViewBase* WebFactoryImpl::CreateWebViewBase( ...@@ -21,4 +22,13 @@ WebViewBase* WebFactoryImpl::CreateWebViewBase(
WebPageVisibilityState state) const { WebPageVisibilityState state) const {
return WebViewImpl::Create(client, state); return WebViewImpl::Create(client, state);
} }
WebLocalFrameBase* WebFactoryImpl::CreateWebLocalFrameBase(
WebTreeScopeType type,
WebFrameClient* client,
blink::InterfaceProvider* provider,
blink::InterfaceRegistry* registry,
WebFrame* opener) const {
return WebLocalFrameImpl::Create(type, client, provider, registry, opener);
}
} }
...@@ -20,6 +20,12 @@ class WebFactoryImpl : public WebFactory { ...@@ -20,6 +20,12 @@ class WebFactoryImpl : public WebFactory {
ChromeClient* CreateChromeClient(WebViewBase*) const override; ChromeClient* CreateChromeClient(WebViewBase*) const override;
WebViewBase* CreateWebViewBase(WebViewClient*, WebViewBase* CreateWebViewBase(WebViewClient*,
WebPageVisibilityState) const override; WebPageVisibilityState) const override;
WebLocalFrameBase* CreateWebLocalFrameBase(
WebTreeScopeType,
WebFrameClient*,
blink::InterfaceProvider*,
blink::InterfaceRegistry*,
WebFrame* opener = nullptr) const override;
}; };
} // namespace blink } // namespace blink
......
...@@ -195,7 +195,10 @@ class WebFrame { ...@@ -195,7 +195,10 @@ class WebFrame {
void ClearOpener() { SetOpener(0); } void ClearOpener() { SetOpener(0); }
// Returns the parent frame or 0 if this is a top-most frame. // Returns the parent frame or 0 if this is a top-most frame.
BLINK_EXPORT WebFrame* Parent() const; // TODO(sashab): "Virtual" is needed here temporarily to resolve linker errors
// in core/. Remove the "virtual" keyword once WebFrame and WebLocalFrameImpl
// have been moved to core/.
BLINK_EXPORT virtual WebFrame* Parent() const;
// Returns the top-most frame in the hierarchy containing this frame. // Returns the top-most frame in the hierarchy containing this frame.
BLINK_EXPORT WebFrame* Top() const; BLINK_EXPORT WebFrame* Top() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment