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

Side by Side Diff: third_party/WebKit/Source/core/workers/AbstractGlobalScope.h

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix memory leak. Created 4 years, 12 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 2015 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 #ifndef AbstractGlobalScope_h
6 #define AbstractGlobalScope_h
7
8 #include "core/dom/ExecutionContext.h"
9 #include "core/dom/SecurityContext.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class GlobalScopeScriptController;
15
16 class CORE_EXPORT AbstractGlobalScope : public SecurityContext, public Execution Context {
17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AbstractGlobalScope);
18 public:
19 ~AbstractGlobalScope() override;
20
21 bool isAbstractGlobalScope() const final { return true; }
22
23 // ExecutionContext
24 void disableEval(const String& errorMessage) final;
25 String userAgent() const final { return m_userAgent; }
26 bool isSecureContext(String& errorMessage, const SecureContextCheck = Standa rdSecureContextCheck) const final;
27
28 virtual ExecutionContext* executionContext() const = 0;
29 virtual GlobalScopeScriptController* script() = 0;
30 virtual v8::Isolate* isolate() const = 0;
31 virtual void didStopRunLoop() = 0;
32
33 using SecurityContext::securityOrigin;
34 using SecurityContext::contentSecurityPolicy;
35
36 DEFINE_INLINE_TRACE() {
37 ExecutionContext::trace(visitor);
38 SecurityContext::trace(visitor);
39 }
40
41 protected:
42 AbstractGlobalScope(const KURL&, const String& userAgent);
43
44 private:
45 void didUpdateSecurityOrigin() final { }
46
47 const KURL& virtualURL() const final { return m_url; }
48 KURL virtualCompleteURL(const String&) const final;
49
50 KURL m_url;
51 String m_userAgent;
52 };
53
54 DEFINE_TYPE_CASTS(AbstractGlobalScope, ExecutionContext, value, value->isAbstrac tGlobalScope(), value.isAbstractGlobalScope());
55
56 } // namespace blink
57
58 #endif // AbstractGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698