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

Side by Side Diff: Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp

Issue 1115923002: workers: Rename WorkerThread to WorkerScript. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "modules/compositorworker/CompositorWorkerGlobalScope.h" 6 #include "modules/compositorworker/CompositorWorkerGlobalScope.h"
7 7
8 #include "bindings/core/v8/SerializedScriptValue.h" 8 #include "bindings/core/v8/SerializedScriptValue.h"
9 #include "core/workers/WorkerObjectProxy.h" 9 #include "core/workers/WorkerObjectProxy.h"
10 #include "core/workers/WorkerThreadStartupData.h" 10 #include "core/workers/WorkerScriptStartupData.h"
11 #include "modules/EventTargetModules.h" 11 #include "modules/EventTargetModules.h"
12 #include "modules/compositorworker/CompositorWorkerThread.h" 12 #include "modules/compositorworker/CompositorWorkerThread.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> CompositorWorkerGlobalScope: :create(CompositorWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> star tupData, double timeOrigin) 16 PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> CompositorWorkerGlobalScope: :create(CompositorWorkerThread* thread, PassOwnPtr<WorkerScriptStartupData> star tupData, double timeOrigin)
17 { 17 {
18 // Note: startupData is finalized on return. After the relevant parts has be en 18 // Note: startupData is finalized on return. After the relevant parts has be en
19 // passed along to the created 'context'. 19 // passed along to the created 'context'.
20 RefPtrWillBeRawPtr<CompositorWorkerGlobalScope> context = adoptRefWillBeNoop (new CompositorWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAg ent, thread, timeOrigin, startupData->m_starterOrigin, startupData->m_workerClie nts.release())); 20 RefPtrWillBeRawPtr<CompositorWorkerGlobalScope> context = adoptRefWillBeNoop (new CompositorWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAg ent, thread, timeOrigin, startupData->m_starterOrigin, startupData->m_workerClie nts.release()));
21 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity Policy, startupData->m_contentSecurityPolicyType); 21 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity Policy, startupData->m_contentSecurityPolicyType);
22 return context.release(); 22 return context.release();
23 } 23 }
24 24
25 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(const KURL& url, const String& userAgent, CompositorWorkerThread* thread, double timeOrigin, const Secu rityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) 25 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(const KURL& url, const String& userAgent, CompositorWorkerThread* thread, double timeOrigin, const Secu rityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients)
26 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients) 26 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 m_callbackCollection.cancelCallback(id); 64 m_callbackCollection.cancelCallback(id);
65 } 65 }
66 66
67 void CompositorWorkerGlobalScope::executeAnimationFrameCallbacks(double highResT imeNow) 67 void CompositorWorkerGlobalScope::executeAnimationFrameCallbacks(double highResT imeNow)
68 { 68 {
69 m_callbackCollection.executeCallbacks(highResTimeNow, highResTimeNow); 69 m_callbackCollection.executeCallbacks(highResTimeNow, highResTimeNow);
70 } 70 }
71 71
72 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const 72 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const
73 { 73 {
74 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread()); 74 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::script());
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698