| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 #ifndef InternalRuntimeFlags_h | 4 #ifndef InternalRuntimeFlags_h |
| 5 #define InternalRuntimeFlags_h | 5 #define InternalRuntimeFlags_h |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptWrappable.h" | 7 #include "bindings/core/v8/ScriptWrappable.h" |
| 8 #include "platform/RuntimeEnabledFeatures.h" | 8 #include "platform/RuntimeEnabledFeatures.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
| 11 #include "wtf/RefPtr.h" | 11 #include "wtf/RefPtr.h" |
| 12 #include "wtf/RefCounted.h" | 12 #include "wtf/RefCounted.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class InternalRuntimeFlags : public GarbageCollected<InternalRuntimeFlags>, publ
ic ScriptWrappable { | 16 class InternalRuntimeFlags : public GarbageCollected<InternalRuntimeFlags>, publ
ic ScriptWrappable { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 public: | 18 public: |
| 19 static InternalRuntimeFlags* create() | 19 static InternalRuntimeFlags* create() |
| 20 { | 20 { |
| 21 return new InternalRuntimeFlags; | 21 return new InternalRuntimeFlags; |
| 22 } | 22 } |
| 23 | 23 |
| 24 {# | 24 // These are reset between layout tests from Internals::resetToConsistentSta
te |
| 25 Setting after startup does not work for most runtime flags, but we | 25 // using RuntimeEnabledFeatures::Backup. |
| 26 could add an option to print setters for ones which do: | 26 {% for feature in standard_features if feature.settable_from_internals %} |
| 27 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se
t{{feature.name}}Enabled(isEnabled); } | 27 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se
t{{feature.name}}Enabled(isEnabled); } |
| 28 If we do that, we also need to respect Internals::resetToConsistentState. | 28 {% endfor %} |
| 29 #} | 29 |
| 30 {% for feature in standard_features %} | 30 {% for feature in standard_features %} |
| 31 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures
::{{feature.first_lowered_name}}Enabled(); } | 31 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures
::{{feature.first_lowered_name}}Enabled(); } |
| 32 {% endfor %} | 32 {% endfor %} |
| 33 | 33 |
| 34 DEFINE_INLINE_TRACE() { } | 34 DEFINE_INLINE_TRACE() { } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 InternalRuntimeFlags() { } | 37 InternalRuntimeFlags() { } |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace blink | 40 } // namespace blink |
| 41 | 41 |
| 42 #endif // InternalRuntimeFlags_h | 42 #endif // InternalRuntimeFlags_h |
| OLD | NEW |