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

Unified Diff: Source/core/workers/WorkerGlobalScope.h

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h
index 08fa1eecff804fb68e2b4c8481108145d02669cd..13e49b0c68708e67c25df994b031afbe13a8dbe8 100644
--- a/Source/core/workers/WorkerGlobalScope.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -36,6 +36,7 @@
#include "core/frame/ContentSecurityPolicy.h"
#include "core/workers/WorkerConsole.h"
#include "core/workers/WorkerEventQueue.h"
+#include "core/workers/WorkerSettings.h"
#include "core/workers/WorkerSupplementable.h"
#include "wtf/Assertions.h"
#include "wtf/HashMap.h"
@@ -135,13 +136,15 @@ namespace WebCore {
double timeOrigin() const { return m_timeOrigin; }
+ WorkerSettings* settings() const { return m_workerSettings.get(); }
+
WorkerClients* clients() { return m_workerClients.get(); }
using SecurityContext::securityOrigin;
using SecurityContext::contentSecurityPolicy;
protected:
- WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>);
+ WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, double timeOrigin, const WorkerSettings&, PassOwnPtr<WorkerClients>);
void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
@@ -181,6 +184,7 @@ namespace WebCore {
OwnPtr<WorkerClients> m_workerClients;
double m_timeOrigin;
+ OwnPtr<WorkerSettings> m_workerSettings;
};
DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorkerGlobalScope(), context.isWorkerGlobalScope());

Powered by Google App Engine
This is Rietveld 408576698