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

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

Issue 424983002: Stop using WebCore namespace in generated code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 WebCore { 14 namespace blink {
15 15
16 class InternalRuntimeFlags : public RefCountedWillBeGarbageCollected<InternalRun timeFlags>, public ScriptWrappable { 16 class InternalRuntimeFlags : public RefCountedWillBeGarbageCollected<InternalRun timeFlags>, public ScriptWrappable {
17 public: 17 public:
18 static PassRefPtrWillBeRawPtr<InternalRuntimeFlags> create() 18 static PassRefPtrWillBeRawPtr<InternalRuntimeFlags> create()
19 { 19 {
20 return adoptRefWillBeNoop(new InternalRuntimeFlags); 20 return adoptRefWillBeNoop(new InternalRuntimeFlags);
21 } 21 }
22 22
23 {# 23 {#
24 Setting after startup does not work for most runtime flags, but we 24 Setting after startup does not work for most runtime flags, but we
25 could add an option to print setters for ones which do: 25 could add an option to print setters for ones which do:
26 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se t{{feature.name}}Enabled(isEnabled); } 26 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se t{{feature.name}}Enabled(isEnabled); }
27 If we do that, we also need to respect Internals::resetToConsistentState. 27 If we do that, we also need to respect Internals::resetToConsistentState.
28 #} 28 #}
29 {% for feature in features if not feature.custom %} 29 {% for feature in features if not feature.custom %}
30 {% filter enable_conditional(feature.condition) %} 30 {% filter enable_conditional(feature.condition) %}
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 {% endfilter %} 32 {% endfilter %}
33 {% endfor %} 33 {% endfor %}
34 34
35 void trace(Visitor*) { } 35 void trace(Visitor*) { }
36 36
37 private: 37 private:
38 InternalRuntimeFlags() 38 InternalRuntimeFlags()
39 { 39 {
40 ScriptWrappable::init(this); 40 ScriptWrappable::init(this);
41 } 41 }
42 }; 42 };
43 43
44 } // namespace WebCore 44 } // namespace blink
45 45
46 #endif // InternalRuntimeFlags_h 46 #endif // InternalRuntimeFlags_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698