| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // These access the wrapped manifest value, returning false when the property | 54 // These access the wrapped manifest value, returning false when the property |
| 55 // does not exist or if the manifest type can't access it. | 55 // does not exist or if the manifest type can't access it. |
| 56 bool HasKey(const std::string& key) const; | 56 bool HasKey(const std::string& key) const; |
| 57 bool HasPath(const std::string& path) const; | 57 bool HasPath(const std::string& path) const; |
| 58 bool Get(const std::string& path, base::Value** out_value) const; | 58 bool Get(const std::string& path, base::Value** out_value) const; |
| 59 bool GetBoolean(const std::string& path, bool* out_value) const; | 59 bool GetBoolean(const std::string& path, bool* out_value) const; |
| 60 bool GetInteger(const std::string& path, int* out_value) const; | 60 bool GetInteger(const std::string& path, int* out_value) const; |
| 61 bool GetString(const std::string& path, std::string* out_value) const; | 61 bool GetString(const std::string& path, std::string* out_value) const; |
| 62 bool GetString(const std::string& path, string16* out_value) const; | 62 bool GetString(const std::string& path, string16* out_value) const; |
| 63 bool GetDictionary(const std::string& path, | 63 bool GetDictionary(const std::string& path, |
| 64 const base::DictionaryValue** out_value) const; |
| 65 bool GetDictionary(const std::string& path, |
| 64 base::DictionaryValue** out_value) const; | 66 base::DictionaryValue** out_value) const; |
| 67 bool GetList(const std::string& path, |
| 68 const base::ListValue** out_value) const; |
| 65 bool GetList(const std::string& path, base::ListValue** out_value) const; | 69 bool GetList(const std::string& path, base::ListValue** out_value) const; |
| 66 | 70 |
| 67 // Returns a new Manifest equal to this one, passing ownership to | 71 // Returns a new Manifest equal to this one, passing ownership to |
| 68 // the caller. | 72 // the caller. |
| 69 Manifest* DeepCopy() const; | 73 Manifest* DeepCopy() const; |
| 70 | 74 |
| 71 // Returns true if this equals the |other| manifest. | 75 // Returns true if this equals the |other| manifest. |
| 72 bool Equals(const Manifest* other) const; | 76 bool Equals(const Manifest* other) const; |
| 73 | 77 |
| 74 // Gets the underlying DictionaryValue representing the manifest. | 78 // Gets the underlying DictionaryValue representing the manifest. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 93 scoped_ptr<base::DictionaryValue> value_; | 97 scoped_ptr<base::DictionaryValue> value_; |
| 94 | 98 |
| 95 Extension::Type type_; | 99 Extension::Type type_; |
| 96 | 100 |
| 97 DISALLOW_COPY_AND_ASSIGN(Manifest); | 101 DISALLOW_COPY_AND_ASSIGN(Manifest); |
| 98 }; | 102 }; |
| 99 | 103 |
| 100 } // namespace extensions | 104 } // namespace extensions |
| 101 | 105 |
| 102 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 106 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| OLD | NEW |