| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef TOOLS_GN_VARIABLES_H_ | 5 #ifndef TOOLS_GN_VARIABLES_H_ |
| 6 #define TOOLS_GN_VARIABLES_H_ | 6 #define TOOLS_GN_VARIABLES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 extern const char kPublic_Help[]; | 160 extern const char kPublic_Help[]; |
| 161 | 161 |
| 162 extern const char kScript[]; | 162 extern const char kScript[]; |
| 163 extern const char kScript_HelpShort[]; | 163 extern const char kScript_HelpShort[]; |
| 164 extern const char kScript_Help[]; | 164 extern const char kScript_Help[]; |
| 165 | 165 |
| 166 extern const char kSources[]; | 166 extern const char kSources[]; |
| 167 extern const char kSources_HelpShort[]; | 167 extern const char kSources_HelpShort[]; |
| 168 extern const char kSources_Help[]; | 168 extern const char kSources_Help[]; |
| 169 | 169 |
| 170 extern const char kTestonly[]; |
| 171 extern const char kTestonly_HelpShort[]; |
| 172 extern const char kTestonly_Help[]; |
| 173 |
| 170 extern const char kVisibility[]; | 174 extern const char kVisibility[]; |
| 171 extern const char kVisibility_HelpShort[]; | 175 extern const char kVisibility_HelpShort[]; |
| 172 extern const char kVisibility_Help[]; | 176 extern const char kVisibility_Help[]; |
| 173 | 177 |
| 174 // ----------------------------------------------------------------------------- | 178 // ----------------------------------------------------------------------------- |
| 175 | 179 |
| 176 struct VariableInfo { | 180 struct VariableInfo { |
| 177 VariableInfo(); | 181 VariableInfo(); |
| 178 VariableInfo(const char* in_help_short, | 182 VariableInfo(const char* in_help_short, |
| 179 const char* in_help); | 183 const char* in_help); |
| 180 | 184 |
| 181 const char* help_short; | 185 const char* help_short; |
| 182 const char* help; | 186 const char* help; |
| 183 }; | 187 }; |
| 184 | 188 |
| 185 typedef std::map<base::StringPiece, VariableInfo> VariableInfoMap; | 189 typedef std::map<base::StringPiece, VariableInfo> VariableInfoMap; |
| 186 | 190 |
| 187 // Returns the built-in readonly variables. | 191 // Returns the built-in readonly variables. |
| 188 // Note: this is used only for help so this getter is not threadsafe. | 192 // Note: this is used only for help so this getter is not threadsafe. |
| 189 const VariableInfoMap& GetBuiltinVariables(); | 193 const VariableInfoMap& GetBuiltinVariables(); |
| 190 | 194 |
| 191 // Returns the variables used by target generators. | 195 // Returns the variables used by target generators. |
| 192 // Note: this is used only for help so this getter is not threadsafe. | 196 // Note: this is used only for help so this getter is not threadsafe. |
| 193 const VariableInfoMap& GetTargetVariables(); | 197 const VariableInfoMap& GetTargetVariables(); |
| 194 | 198 |
| 195 } // namespace variables | 199 } // namespace variables |
| 196 | 200 |
| 197 #endif // TOOLS_GN_VARIABLES_H_ | 201 #endif // TOOLS_GN_VARIABLES_H_ |
| OLD | NEW |