OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 WorkerSettings_h | |
6 #define WorkerSettings_h | |
7 | |
8 #include "core/CoreExport.h" | |
9 #include "core/dom/ExecutionContext.h" | |
10 #include "core/frame/Settings.h" | |
11 #include "core/workers/WorkerClients.h" | |
12 #include "platform/Supplementable.h" | |
13 #include "platform/heap/Handle.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class CORE_EXPORT WorkerSettings : public GarbageCollectedFinalized<WorkerSettin gs>, public Supplement<WorkerClients> { | |
kinuko
2016/07/22 09:02:54
Does this need to be on-heap? (Just asking)
xlai (Olivia)
2016/07/22 21:53:30
Hmmm, not necessary. But isn't better to be on hea
| |
18 USING_GARBAGE_COLLECTED_MIXIN(WorkerSettings); | |
19 WTF_MAKE_NONCOPYABLE(WorkerSettings); | |
20 | |
21 public: | |
22 virtual ~WorkerSettings() {} | |
23 DECLARE_VIRTUAL_TRACE(); | |
24 | |
25 static WorkerSettings* create(Settings*); | |
26 | |
27 static const char* supplementName(); | |
28 static WorkerSettings* from(ExecutionContext*); | |
29 | |
30 bool disableReadingFromCanvas() const { return m_disableReadingFromCanvas; } | |
31 | |
32 private: | |
33 WorkerSettings() {} | |
34 void copyFlagValuesFromSettings(Settings*); | |
35 // The settings that are to be copied from main thread to worker thread | |
36 // These setting's flag values must remain unchanged throughout the document | |
37 // lifecycle. | |
38 // We hard-code the flags as there're very few flags at this moment. | |
39 bool m_disableReadingFromCanvas = false; | |
40 }; | |
41 | |
42 CORE_EXPORT void provideWorkerSettingsToWorker(WorkerClients*, WorkerSettings*); | |
43 } | |
kinuko
2016/07/22 09:02:54
nit: please have empty line before line 43, and ma
xlai (Olivia)
2016/07/22 21:53:30
Done.
| |
44 | |
45 #endif // WorkerSettings_h | |
OLD | NEW |