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

Side by Side 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, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/compositorworker/CompositorWorker.h" 5 #include "modules/compositorworker/CompositorWorker.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/dom/CompositorProxyClient.h"
8 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
9 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
11 #include "core/page/ChromeClient.h"
10 #include "core/workers/WorkerClients.h" 12 #include "core/workers/WorkerClients.h"
11 #include "modules/EventTargetModules.h" 13 #include "modules/EventTargetModules.h"
12 #include "modules/compositorworker/CompositorWorkerMessagingProxy.h" 14 #include "modules/compositorworker/CompositorWorkerMessagingProxy.h"
13 #include "wtf/MainThread.h" 15 #include "wtf/MainThread.h"
14 16
15 namespace blink { 17 namespace blink {
16 18
17 inline CompositorWorker::CompositorWorker(ExecutionContext* context) 19 inline CompositorWorker::CompositorWorker(ExecutionContext* context)
18 : InProcessWorkerBase(context) 20 : InProcessWorkerBase(context)
19 { 21 {
(...skipping 16 matching lines...) Expand all
36 CompositorWorker::~CompositorWorker() 38 CompositorWorker::~CompositorWorker()
37 { 39 {
38 ASSERT(isMainThread()); 40 ASSERT(isMainThread());
39 } 41 }
40 42
41 const AtomicString& CompositorWorker::interfaceName() const 43 const AtomicString& CompositorWorker::interfaceName() const
42 { 44 {
43 return EventTargetNames::CompositorWorker; 45 return EventTargetNames::CompositorWorker;
44 } 46 }
45 47
46 WorkerGlobalScopeProxy* CompositorWorker::createWorkerGlobalScopeProxy(Execution Context* worker) 48 WorkerGlobalScopeProxy* CompositorWorker::createWorkerGlobalScopeProxy(Execution Context* context)
47 { 49 {
48 ASSERT(executionContext()->isDocument()); 50 ASSERT(context->isDocument());
49 return new CompositorWorkerMessagingProxy(this); 51 Document* document = toDocument(context);
52 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
53 provideCompositorProxyClientTo(workerClients.get(), adoptPtrWillBeNoop(docum ent->frame()->chromeClient().createCompositorProxyClient()));
54 return new CompositorWorkerMessagingProxy(this, workerClients.release());
50 } 55 }
51 56
52 } // namespace blink 57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698