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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.h.tmpl

Issue 1895293002: Test fragment scrolling and history restoration interaction w/ scroll anchoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove .cpp.tmpl and other review comments Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698