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

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

Issue 2589143003: Add 'get' prefix for Settings.in generated code. (Closed)
Patch Set: Only get prefix and no capitalization. Created 3 years, 11 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 SettingsMacros_h 4 #ifndef SettingsMacros_h
5 #define SettingsMacros_h 5 #define SettingsMacros_h
6 6
7 #define SETTINGS_GETTERS_AND_SETTERS \ 7 #define SETTINGS_GETTERS_AND_SETTERS \
8 {% for setting in settings %} 8 {% for setting in settings %}
9 {{setting.type|to_passing_type}} {{setting.name}}() const { return m_{{setti ng.name}}; } \ 9 {{setting.type|to_passing_type}} get{{setting.name|upper_first}}() const { r eturn m_{{setting.name}}; } \
10 void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{sett ing.name}}); \ 10 void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{sett ing.name}}); \
11 {% endfor %} 11 {% endfor %}
12 void setFromStrings(const String& name, const String& value); 12 void setFromStrings(const String& name, const String& value);
13 // End of SETTINGS_GETTERS_AND_SETTERS. 13 // End of SETTINGS_GETTERS_AND_SETTERS.
14 14
15 #define SETTINGS_MEMBER_VARIABLES \ 15 #define SETTINGS_MEMBER_VARIABLES \
16 {% for setting in settings if setting.type != 'bool' %} 16 {% for setting in settings if setting.type != 'bool' %}
17 {{setting.type}} m_{{setting.name}}; \ 17 {{setting.type}} m_{{setting.name}}; \
18 {% endfor %} 18 {% endfor %}
19 {% for setting in settings if setting.type == 'bool' %} 19 {% for setting in settings if setting.type == 'bool' %}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static_cast<{{setting.type}}>(value.toInt()) \ 59 static_cast<{{setting.type}}>(value.toInt()) \
60 {% endif %} 60 {% endif %}
61 ); \ 61 ); \
62 return; \ 62 return; \
63 } \ 63 } \
64 {% endfor %} 64 {% endfor %}
65 } 65 }
66 // End of SETTINGS_SETTER_BODIES. 66 // End of SETTINGS_SETTER_BODIES.
67 67
68 #endif // SettingsMacros_h 68 #endif // SettingsMacros_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698