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

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

Issue 1992933002: Introduce WorkletGlobalScopeProxy interface. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests. 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 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 const KURL& url() const { return m_url; } 82 const KURL& url() const { return m_url; }
83 KURL completeURL(const String&) const; 83 KURL completeURL(const String&) const;
84 84
85 String userAgent() const final; 85 String userAgent() const final;
86 void disableEval(const String& errorMessage) final; 86 void disableEval(const String& errorMessage) final;
87 87
88 WorkerOrWorkletScriptController* scriptController() final { return m_scriptC ontroller.get(); } 88 WorkerOrWorkletScriptController* scriptController() final { return m_scriptC ontroller.get(); }
89 89
90 virtual void didEvaluateWorkerScript(); 90 virtual void didEvaluateWorkerScript();
91 void dispose(); 91 void dispose() override;
92 92
93 WorkerThread* thread() const { return m_thread; } 93 WorkerThread* thread() const { return m_thread; }
94 94
95 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask> ) final; // Executes the task on context's thread asynchronously. 95 void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionContextTask> ) final; // Executes the task on context's thread asynchronously.
96 96
97 // WorkerGlobalScope 97 // WorkerGlobalScope
98 WorkerGlobalScope* self() { return this; } 98 WorkerGlobalScope* self() { return this; }
99 WorkerLocation* location() const; 99 WorkerLocation* location() const;
100 void close(); 100 void close();
101 101
(...skipping 20 matching lines...) Expand all
122 bool isJSExecutionForbidden() const final; 122 bool isJSExecutionForbidden() const final;
123 123
124 DOMTimerCoordinator* timers() final; 124 DOMTimerCoordinator* timers() final;
125 125
126 WorkerInspectorController* workerInspectorController() { return m_workerInsp ectorController.get(); } 126 WorkerInspectorController* workerInspectorController() { return m_workerInsp ectorController.get(); }
127 127
128 // Returns true when the WorkerGlobalScope is closing (e.g. via close() 128 // Returns true when the WorkerGlobalScope is closing (e.g. via close()
129 // method). If this returns true, the worker is going to be shutdown after 129 // method). If this returns true, the worker is going to be shutdown after
130 // the current task execution. Workers that don't support close operation 130 // the current task execution. Workers that don't support close operation
131 // should always return false. 131 // should always return false.
132 bool isClosing() const { return m_closing; } 132 bool isClosing() const final { return m_closing; }
133 133
134 double timeOrigin() const { return m_timeOrigin; } 134 double timeOrigin() const { return m_timeOrigin; }
135 135
136 WorkerClients* clients() { return m_workerClients.get(); } 136 WorkerClients* clients() { return m_workerClients.get(); }
137 137
138 using SecurityContext::getSecurityOrigin; 138 using SecurityContext::getSecurityOrigin;
139 using SecurityContext::contentSecurityPolicy; 139 using SecurityContext::contentSecurityPolicy;
140 140
141 void addConsoleMessage(ConsoleMessage*) final; 141 void addConsoleMessage(ConsoleMessage*) final;
142 ConsoleMessageStorage* messageStorage(); 142 ConsoleMessageStorage* messageStorage();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Member<ConsoleMessageStorage> m_messageStorage; 202 Member<ConsoleMessageStorage> m_messageStorage;
203 203
204 HeapListHashSet<Member<V8AbstractEventListener>> m_eventListeners; 204 HeapListHashSet<Member<V8AbstractEventListener>> m_eventListeners;
205 }; 205 };
206 206
207 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 207 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
208 208
209 } // namespace blink 209 } // namespace blink
210 210
211 #endif // WorkerGlobalScope_h 211 #endif // WorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698