OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 EXTENSIONS_COMMON_MANIFEST_H_ | 5 #ifndef EXTENSIONS_COMMON_MANIFEST_H_ |
6 #define EXTENSIONS_COMMON_MANIFEST_H_ | 6 #define EXTENSIONS_COMMON_MANIFEST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 bool is_shared_module() const { return type_ == TYPE_SHARED_MODULE; } | 142 bool is_shared_module() const { return type_ == TYPE_SHARED_MODULE; } |
143 | 143 |
144 // These access the wrapped manifest value, returning false when the property | 144 // These access the wrapped manifest value, returning false when the property |
145 // does not exist or if the manifest type can't access it. | 145 // does not exist or if the manifest type can't access it. |
146 bool HasKey(const std::string& key) const; | 146 bool HasKey(const std::string& key) const; |
147 bool HasPath(const std::string& path) const; | 147 bool HasPath(const std::string& path) const; |
148 bool Get(const std::string& path, const base::Value** out_value) const; | 148 bool Get(const std::string& path, const base::Value** out_value) const; |
149 bool GetBoolean(const std::string& path, bool* out_value) const; | 149 bool GetBoolean(const std::string& path, bool* out_value) const; |
150 bool GetInteger(const std::string& path, int* out_value) const; | 150 bool GetInteger(const std::string& path, int* out_value) const; |
151 bool GetString(const std::string& path, std::string* out_value) const; | 151 bool GetString(const std::string& path, std::string* out_value) const; |
152 bool GetString(const std::string& path, string16* out_value) const; | 152 bool GetString(const std::string& path, base::string16* out_value) const; |
153 bool GetDictionary(const std::string& path, | 153 bool GetDictionary(const std::string& path, |
154 const base::DictionaryValue** out_value) const; | 154 const base::DictionaryValue** out_value) const; |
155 bool GetList(const std::string& path, | 155 bool GetList(const std::string& path, |
156 const base::ListValue** out_value) const; | 156 const base::ListValue** out_value) const; |
157 | 157 |
158 // Returns a new Manifest equal to this one, passing ownership to | 158 // Returns a new Manifest equal to this one, passing ownership to |
159 // the caller. | 159 // the caller. |
160 Manifest* DeepCopy() const; | 160 Manifest* DeepCopy() const; |
161 | 161 |
162 // Returns true if this equals the |other| manifest. | 162 // Returns true if this equals the |other| manifest. |
(...skipping 21 matching lines...) Expand all Loading... |
184 scoped_ptr<base::DictionaryValue> value_; | 184 scoped_ptr<base::DictionaryValue> value_; |
185 | 185 |
186 Type type_; | 186 Type type_; |
187 | 187 |
188 DISALLOW_COPY_AND_ASSIGN(Manifest); | 188 DISALLOW_COPY_AND_ASSIGN(Manifest); |
189 }; | 189 }; |
190 | 190 |
191 } // namespace extensions | 191 } // namespace extensions |
192 | 192 |
193 #endif // EXTENSIONS_COMMON_MANIFEST_H_ | 193 #endif // EXTENSIONS_COMMON_MANIFEST_H_ |
OLD | NEW |