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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual ~Manifest(); | 26 virtual ~Manifest(); |
27 | 27 |
28 const std::string& extension_id() const { return extension_id_; } | 28 const std::string& extension_id() const { return extension_id_; } |
29 void set_extension_id(const std::string& id) { extension_id_ = id; } | 29 void set_extension_id(const std::string& id) { extension_id_ = id; } |
30 | 30 |
31 Extension::Location location() const { return location_; } | 31 Extension::Location location() const { return location_; } |
32 void set_location(Extension::Location location) { location_ = location; } | 32 void set_location(Extension::Location location) { location_ = location; } |
33 | 33 |
34 // Returns true if all keys in the manifest can be specified by | 34 // Returns true if all keys in the manifest can be specified by |
35 // the extension type. | 35 // the extension type. |
36 bool ValidateManifest(string16* error) const; | 36 void ValidateManifest(std::vector<std::string>* warnings) const; |
37 | 37 |
38 // The version of this extension's manifest. We increase the manifest | 38 // The version of this extension's manifest. We increase the manifest |
39 // version when making breaking changes to the extension system. If the | 39 // version when making breaking changes to the extension system. If the |
40 // manifest contains no explicit manifest version, this returns the current | 40 // manifest contains no explicit manifest version, this returns the current |
41 // system default. | 41 // system default. |
42 int GetManifestVersion() const; | 42 int GetManifestVersion() const; |
43 | 43 |
44 // Returns the manifest type. | 44 // Returns the manifest type. |
45 Extension::Type GetType() const; | 45 Extension::Type GetType() const; |
46 | 46 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // The underlying dictionary representation of the manifest. | 96 // The underlying dictionary representation of the manifest. |
97 scoped_ptr<base::DictionaryValue> value_; | 97 scoped_ptr<base::DictionaryValue> value_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(Manifest); | 99 DISALLOW_COPY_AND_ASSIGN(Manifest); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace extensions | 102 } // namespace extensions |
103 | 103 |
104 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 104 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
OLD | NEW |