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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp

Issue 1625473002: compositor-worker: blink->cc plumbing Base URL: https://chromium.googlesource.com/chromium/src.git@upstream-compositor-worker
Patch Set: Merge with landing of https://codereview.chromium.org/1599673002/ on master Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
index a348c194302b14aff88bd60c2a2be7334eda8aff..24291222698e25c2f8b9bbb1f1d3d51b7f5453d4 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
@@ -5,8 +5,10 @@
#include "modules/compositorworker/CompositorWorker.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "core/dom/CompositorProxyClient.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
+#include "core/page/ChromeClient.h"
#include "core/workers/WorkerClients.h"
#include "modules/EventTargetModules.h"
#include "modules/compositorworker/CompositorWorkerMessagingProxy.h"
@@ -43,10 +45,13 @@ const AtomicString& CompositorWorker::interfaceName() const
return EventTargetNames::CompositorWorker;
}
-WorkerGlobalScopeProxy* CompositorWorker::createWorkerGlobalScopeProxy(ExecutionContext* worker)
+WorkerGlobalScopeProxy* CompositorWorker::createWorkerGlobalScopeProxy(ExecutionContext* context)
{
- ASSERT(executionContext()->isDocument());
- return new CompositorWorkerMessagingProxy(this);
+ ASSERT(context->isDocument());
+ Document* document = toDocument(context);
+ OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
+ provideCompositorProxyClientTo(workerClients.get(), adoptPtrWillBeNoop(document->frame()->chromeClient().createCompositorProxyClient()));
+ return new CompositorWorkerMessagingProxy(this, workerClients.release());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698