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

Side by Side Diff: third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/workers/MainThreadWorkletGlobalScope.h"
6
7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
9 #include "core/frame/FrameConsole.h"
10
11 namespace blink {
12
13 MainThreadWorkletGlobalScope::MainThreadWorkletGlobalScope(LocalFrame* frame, co nst KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigi n, v8::Isolate* isolate)
14 : WorkletGlobalScope(url, userAgent, securityOrigin, isolate)
15 , LocalFrameLifecycleObserver(frame)
16 {
17 }
18
19 MainThreadWorkletGlobalScope::~MainThreadWorkletGlobalScope()
20 {
21 }
22
23 void MainThreadWorkletGlobalScope::evaluateScript(const String& source, const KU RL& scriptURL)
24 {
25 scriptController()->evaluate(ScriptSourceCode(source, scriptURL));
26 }
27
28 void MainThreadWorkletGlobalScope::terminateWorkletGlobalScope()
29 {
30 dispose();
31 }
32
33 void MainThreadWorkletGlobalScope::addConsoleMessage(ConsoleMessage* consoleMess age)
34 {
35 frame()->console().addMessage(consoleMessage);
36 }
37
38 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698