| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 5 #ifndef EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 
| 6 #define EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 6 #define EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <memory> | 9 #include <memory> | 
| 10 #include <set> | 10 #include <set> | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 124 | 124 | 
| 125   // The reference the argument points to, if any. Note that if this is set, | 125   // The reference the argument points to, if any. Note that if this is set, | 
| 126   // none of the following fields describing the argument will be. | 126   // none of the following fields describing the argument will be. | 
| 127   base::Optional<std::string> ref_; | 127   base::Optional<std::string> ref_; | 
| 128 | 128 | 
| 129   // The type of instance an object should be, if any. Only applicable for | 129   // The type of instance an object should be, if any. Only applicable for | 
| 130   // ArgumentType::OBJECT. If specified, the argument must contain the instance | 130   // ArgumentType::OBJECT. If specified, the argument must contain the instance | 
| 131   // type in its prototype chain. | 131   // type in its prototype chain. | 
| 132   base::Optional<std::string> instance_of_; | 132   base::Optional<std::string> instance_of_; | 
| 133 | 133 | 
| 134   // A minimum, if any. | 134   // A minimum and maximum for integer and double values, if any. | 
| 135   base::Optional<int> minimum_; | 135   base::Optional<int> minimum_; | 
|  | 136   base::Optional<int> maximum_; | 
| 136 | 137 | 
| 137   // A minimium length for strings or arrays. | 138   // A minimium length for strings or arrays. | 
| 138   base::Optional<size_t> min_length_; | 139   base::Optional<size_t> min_length_; | 
| 139 | 140 | 
| 140   // A maximum length for strings or arrays. | 141   // A maximum length for strings or arrays. | 
| 141   base::Optional<size_t> max_length_; | 142   base::Optional<size_t> max_length_; | 
| 142 | 143 | 
| 143   // A map of required properties; present only for objects. Note that any | 144   // A map of required properties; present only for objects. Note that any | 
| 144   // properties *not* defined in this map will be dropped during conversion. | 145   // properties *not* defined in this map will be dropped during conversion. | 
| 145   std::map<std::string, std::unique_ptr<ArgumentSpec>> properties_; | 146   std::map<std::string, std::unique_ptr<ArgumentSpec>> properties_; | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 158   // to allow the API to pass an object with arbitrary properties. Only | 159   // to allow the API to pass an object with arbitrary properties. Only | 
| 159   // applicable for ArgumentType::OBJECT. | 160   // applicable for ArgumentType::OBJECT. | 
| 160   std::unique_ptr<ArgumentSpec> additional_properties_; | 161   std::unique_ptr<ArgumentSpec> additional_properties_; | 
| 161 | 162 | 
| 162   DISALLOW_COPY_AND_ASSIGN(ArgumentSpec); | 163   DISALLOW_COPY_AND_ASSIGN(ArgumentSpec); | 
| 163 }; | 164 }; | 
| 164 | 165 | 
| 165 }  // namespace extensions | 166 }  // namespace extensions | 
| 166 | 167 | 
| 167 #endif  // EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 168 #endif  // EXTENSIONS_RENDERER_ARGUMENT_SPEC_H_ | 
| OLD | NEW | 
|---|