Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/common/extensions/manifest.h

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/manifest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool is_hosted_app() const { return type_ == TYPE_HOSTED_APP; } 117 bool is_hosted_app() const { return type_ == TYPE_HOSTED_APP; }
118 bool is_legacy_packaged_app() const { 118 bool is_legacy_packaged_app() const {
119 return type_ == TYPE_LEGACY_PACKAGED_APP; 119 return type_ == TYPE_LEGACY_PACKAGED_APP;
120 } 120 }
121 bool is_extension() const { return type_ == TYPE_EXTENSION; } 121 bool is_extension() const { return type_ == TYPE_EXTENSION; }
122 122
123 // These access the wrapped manifest value, returning false when the property 123 // These access the wrapped manifest value, returning false when the property
124 // does not exist or if the manifest type can't access it. 124 // does not exist or if the manifest type can't access it.
125 bool HasKey(const std::string& key) const; 125 bool HasKey(const std::string& key) const;
126 bool HasPath(const std::string& path) const; 126 bool HasPath(const std::string& path) const;
127 bool Get(const std::string& path, base::Value** out_value) const; 127 bool Get(const std::string& path, const base::Value** out_value) const;
128 bool GetBoolean(const std::string& path, bool* out_value) const; 128 bool GetBoolean(const std::string& path, bool* out_value) const;
129 bool GetInteger(const std::string& path, int* out_value) const; 129 bool GetInteger(const std::string& path, int* out_value) const;
130 bool GetString(const std::string& path, std::string* out_value) const; 130 bool GetString(const std::string& path, std::string* out_value) const;
131 bool GetString(const std::string& path, string16* out_value) const; 131 bool GetString(const std::string& path, string16* out_value) const;
132 bool GetDictionary(const std::string& path, 132 bool GetDictionary(const std::string& path,
133 const base::DictionaryValue** out_value) const; 133 const base::DictionaryValue** out_value) const;
134 bool GetDictionary(const std::string& path,
135 base::DictionaryValue** out_value) const;
136 bool GetList(const std::string& path, 134 bool GetList(const std::string& path,
137 const base::ListValue** out_value) const; 135 const base::ListValue** out_value) const;
138 bool GetList(const std::string& path, base::ListValue** out_value) const;
139 136
140 // Returns a new Manifest equal to this one, passing ownership to 137 // Returns a new Manifest equal to this one, passing ownership to
141 // the caller. 138 // the caller.
142 Manifest* DeepCopy() const; 139 Manifest* DeepCopy() const;
143 140
144 // Returns true if this equals the |other| manifest. 141 // Returns true if this equals the |other| manifest.
145 bool Equals(const Manifest* other) const; 142 bool Equals(const Manifest* other) const;
146 143
147 // Gets the underlying DictionaryValue representing the manifest. 144 // Gets the underlying DictionaryValue representing the manifest.
148 // Note: only use this when you KNOW you don't need the validation. 145 // Note: only use this when you KNOW you don't need the validation.
(...skipping 17 matching lines...) Expand all
166 scoped_ptr<base::DictionaryValue> value_; 163 scoped_ptr<base::DictionaryValue> value_;
167 164
168 Type type_; 165 Type type_;
169 166
170 DISALLOW_COPY_AND_ASSIGN(Manifest); 167 DISALLOW_COPY_AND_ASSIGN(Manifest);
171 }; 168 };
172 169
173 } // namespace extensions 170 } // namespace extensions
174 171
175 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ 172 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698