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

Unified Diff: public/web/WebWorkerSettings.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, 9 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
« public/web/WebSharedWorker.h ('K') | « public/web/WebSharedWorker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebWorkerSettings.h
diff --git a/public/web/WebWorkerSettings.h b/public/web/WebWorkerSettings.h
new file mode 100644
index 0000000000000000000000000000000000000000..4b0d814b88e47a1c2cc62243bef59687217fc7bd
--- /dev/null
+++ b/public/web/WebWorkerSettings.h
@@ -0,0 +1,52 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebWorkerSettings_h
+#define WebWorkerSettings_h
+
+#include "public/platform/WebCommon.h"
+#include "public/platform/WebPrivateOwnPtr.h"
+
+namespace WebCore {
+class WorkerSettings;
+}
+
+#if BLINK_IMPLEMENTATION
+namespace WTF { template <typename T> class PassOwnPtr; }
+#endif
+
+namespace blink {
+
+// WebWorkerSettings is owned by the WebSharedWorker, and allows code to
+// modify the settings for the WebSharedWorker.
kinuko 2014/03/10 05:55:52 This comment looks wrong now?
+class WebWorkerSettings {
+public:
+ ~WebWorkerSettings() { reset(); }
+
+ WebWorkerSettings(const WebWorkerSettings& n) { assign(n); }
+
+ WebWorkerSettings& operator=(const WebWorkerSettings& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ BLINK_EXPORT static WebWorkerSettings create();
+ BLINK_EXPORT void reset();
+ BLINK_EXPORT void assign(const WebWorkerSettings&);
+
+ BLINK_EXPORT void setMemoryInfoEnabled(bool);
abarth-chromium 2014/03/10 21:32:36 Does this setting need to be per-worker? Do we no
abarth-chromium 2014/03/10 21:33:29 If this maps to a command-line flag in Chromium, i
+
+#if BLINK_IMPLEMENTATION
+ WebWorkerSettings(const WTF::PassOwnPtr<WebCore::WorkerSettings>&);
+ operator WTF::PassOwnPtr<WebCore::WorkerSettings>() const;
+#endif
+
+private:
+ WebPrivateOwnPtr<WebCore::WorkerSettings> m_private;
+};
+
+} // namespace blink
+
+#endif
« public/web/WebSharedWorker.h ('K') | « public/web/WebSharedWorker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698