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_FEATURES_FEATURE_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ |
6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ | 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 SetCurrentChannel(original_channel_); | 119 SetCurrentChannel(original_channel_); |
120 } | 120 } |
121 | 121 |
122 private: | 122 private: |
123 chrome::VersionInfo::Channel original_channel_; | 123 chrome::VersionInfo::Channel original_channel_; |
124 }; | 124 }; |
125 | 125 |
126 const std::string& name() const { return name_; } | 126 const std::string& name() const { return name_; } |
127 void set_name(const std::string& name) { name_ = name; } | 127 void set_name(const std::string& name) { name_ = name; } |
128 const std::set<std::string>& dependencies() { return dependencies_; } | 128 const std::set<std::string>& dependencies() { return dependencies_; } |
| 129 bool no_parent() const { return no_parent_; } |
129 | 130 |
130 // Gets the platform the code is currently running on. | 131 // Gets the platform the code is currently running on. |
131 static Platform GetCurrentPlatform(); | 132 static Platform GetCurrentPlatform(); |
132 | 133 |
133 // Gets the Feature::Location value for the specified Manifest::Location. | 134 // Gets the Feature::Location value for the specified Manifest::Location. |
134 static Location ConvertLocation(Manifest::Location extension_location); | 135 static Location ConvertLocation(Manifest::Location extension_location); |
135 | 136 |
136 virtual std::set<Context>* GetContexts() = 0; | 137 virtual std::set<Context>* GetContexts() = 0; |
137 | 138 |
138 // Tests whether this is an internal API or not. | 139 // Tests whether this is an internal API or not. |
(...skipping 28 matching lines...) Expand all Loading... |
167 | 168 |
168 virtual std::string GetAvailabilityMessage(AvailabilityResult result, | 169 virtual std::string GetAvailabilityMessage(AvailabilityResult result, |
169 Manifest::Type type, | 170 Manifest::Type type, |
170 const GURL& url) const = 0; | 171 const GURL& url) const = 0; |
171 | 172 |
172 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; | 173 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; |
173 | 174 |
174 protected: | 175 protected: |
175 std::string name_; | 176 std::string name_; |
176 std::set<std::string> dependencies_; | 177 std::set<std::string> dependencies_; |
| 178 bool no_parent_; |
177 }; | 179 }; |
178 | 180 |
179 } // namespace extensions | 181 } // namespace extensions |
180 | 182 |
181 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ | 183 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ |
OLD | NEW |