Chromium Code Reviews| 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 |