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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp

Issue 2029163002: Worklets - Change inheritance heirarchy of WorkletGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/csspaint/PaintWorkletGlobalScope.h" 5 #include "modules/csspaint/PaintWorkletGlobalScope.h"
6 6
7 #include "bindings/core/v8/V8BindingMacros.h" 7 #include "bindings/core/v8/V8BindingMacros.h"
8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
9 #include "core/CSSPropertyNames.h" 9 #include "core/CSSPropertyNames.h"
10 #include "core/css/parser/CSSVariableParser.h" 10 #include "core/css/parser/CSSVariableParser.h"
11 #include "core/dom/ExceptionCode.h" 11 #include "core/dom/ExceptionCode.h"
12 #include "core/inspector/MainThreadDebugger.h" 12 #include "core/inspector/MainThreadDebugger.h"
13 #include "modules/csspaint/CSSPaintDefinition.h" 13 #include "modules/csspaint/CSSPaintDefinition.h"
14 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" 14 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 // static 18 // static
19 PaintWorkletGlobalScope* PaintWorkletGlobalScope::create(LocalFrame* frame, cons t KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate) 19 PaintWorkletGlobalScope* PaintWorkletGlobalScope::create(LocalFrame* frame, cons t KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate)
20 { 20 {
21 PaintWorkletGlobalScope* paintWorkletGlobalScope = new PaintWorkletGlobalSco pe(frame, url, userAgent, securityOrigin, isolate); 21 PaintWorkletGlobalScope* paintWorkletGlobalScope = new PaintWorkletGlobalSco pe(frame, url, userAgent, securityOrigin, isolate);
22 paintWorkletGlobalScope->scriptController()->initializeContextIfNeeded(); 22 paintWorkletGlobalScope->scriptController()->initializeContextIfNeeded();
23 MainThreadDebugger::instance()->contextCreated(paintWorkletGlobalScope->scri ptController()->getScriptState(), paintWorkletGlobalScope->frame(), paintWorklet GlobalScope->getSecurityOrigin()); 23 MainThreadDebugger::instance()->contextCreated(paintWorkletGlobalScope->scri ptController()->getScriptState(), paintWorkletGlobalScope->frame(), paintWorklet GlobalScope->getSecurityOrigin());
24 return paintWorkletGlobalScope; 24 return paintWorkletGlobalScope;
25 } 25 }
26 26
27 PaintWorkletGlobalScope::PaintWorkletGlobalScope(LocalFrame* frame, const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Iso late* isolate) 27 PaintWorkletGlobalScope::PaintWorkletGlobalScope(LocalFrame* frame, const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Iso late* isolate)
28 : WorkletGlobalScope(frame, url, userAgent, securityOrigin, isolate) 28 : MainThreadWorkletGlobalScope(frame, url, userAgent, securityOrigin, isolat e)
29 { 29 {
30 } 30 }
31 31
32 PaintWorkletGlobalScope::~PaintWorkletGlobalScope() 32 PaintWorkletGlobalScope::~PaintWorkletGlobalScope()
33 { 33 {
34 } 34 }
35 35
36 void PaintWorkletGlobalScope::dispose() 36 void PaintWorkletGlobalScope::dispose()
37 { 37 {
38 // Explicitly clear the paint defininitions to break a reference cycle 38 // Explicitly clear the paint defininitions to break a reference cycle
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 Member<GeneratorHashSet>& set = m_pendingGenerators.add(name, nullptr).store dValue->value; 146 Member<GeneratorHashSet>& set = m_pendingGenerators.add(name, nullptr).store dValue->value;
147 if (!set) 147 if (!set)
148 set = new GeneratorHashSet; 148 set = new GeneratorHashSet;
149 set->add(generator); 149 set->add(generator);
150 } 150 }
151 151
152 DEFINE_TRACE(PaintWorkletGlobalScope) 152 DEFINE_TRACE(PaintWorkletGlobalScope)
153 { 153 {
154 visitor->trace(m_paintDefinitions); 154 visitor->trace(m_paintDefinitions);
155 visitor->trace(m_pendingGenerators); 155 visitor->trace(m_pendingGenerators);
156 WorkletGlobalScope::trace(visitor); 156 MainThreadWorkletGlobalScope::trace(visitor);
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698