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

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: address 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 {
21 return new InternalRuntimeFlags;
22 }
23 20
24 {# 21 {% for feature in standard_features if feature.settable_from_internals %}
25 Setting after startup does not work for most runtime flags, but we 22 void set{{feature.name}}Enabled(bool isEnabled);
26 could add an option to print setters for ones which do: 23 {% endfor %}
27 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se t{{feature.name}}Enabled(isEnabled); } 24
28 If we do that, we also need to respect Internals::resetToConsistentState.
29 #}
30 {% for feature in standard_features %} 25 {% for feature in standard_features %}
31 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures ::{{feature.first_lowered_name}}Enabled(); } 26 bool {{feature.first_lowered_name}}Enabled();
32 {% endfor %} 27 {% endfor %}
33 28
34 DEFINE_INLINE_TRACE() { } 29 DEFINE_INLINE_TRACE() { }
35 30
36 private: 31 private:
37 InternalRuntimeFlags() { } 32 InternalRuntimeFlags();
33
34 {% for feature in standard_features %}
35 bool m_{{feature.first_lowered_name}};
jbroman 2016/04/28 14:24:39 Why do these members exist? You don't seem to actu
ymalik 2016/04/28 15:05:06 You're right they're not needed. I had them here b
36 {% endfor %}
38 }; 37 };
39 38
40 } // namespace blink 39 } // namespace blink
41 40
42 #endif // InternalRuntimeFlags_h 41 #endif // InternalRuntimeFlags_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698