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_FEATURES_FEATURE_H_ | 5 #ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 static Platform GetCurrentPlatform(); | 113 static Platform GetCurrentPlatform(); |
114 | 114 |
115 // Gets the Feature::Location value for the specified Manifest::Location. | 115 // Gets the Feature::Location value for the specified Manifest::Location. |
116 static Location ConvertLocation(Manifest::Location extension_location); | 116 static Location ConvertLocation(Manifest::Location extension_location); |
117 | 117 |
118 virtual std::set<Context>* GetContexts() = 0; | 118 virtual std::set<Context>* GetContexts() = 0; |
119 | 119 |
120 // Tests whether this is an internal API or not. | 120 // Tests whether this is an internal API or not. |
121 virtual bool IsInternal() const = 0; | 121 virtual bool IsInternal() const = 0; |
122 | 122 |
| 123 // Returns True for features excluded from service worker backed contexts. |
| 124 virtual bool IsBlockedInServiceWorker() const = 0; |
| 125 |
123 // Returns true if the feature is available to be parsed into a new extension | 126 // Returns true if the feature is available to be parsed into a new extension |
124 // manifest. | 127 // manifest. |
125 Availability IsAvailableToManifest(const std::string& extension_id, | 128 Availability IsAvailableToManifest(const std::string& extension_id, |
126 Manifest::Type type, | 129 Manifest::Type type, |
127 Location location, | 130 Location location, |
128 int manifest_version) const { | 131 int manifest_version) const { |
129 return IsAvailableToManifest(extension_id, type, location, manifest_version, | 132 return IsAvailableToManifest(extension_id, type, location, manifest_version, |
130 GetCurrentPlatform()); | 133 GetCurrentPlatform()); |
131 } | 134 } |
132 virtual Availability IsAvailableToManifest(const std::string& extension_id, | 135 virtual Availability IsAvailableToManifest(const std::string& extension_id, |
(...skipping 23 matching lines...) Expand all Loading... |
156 | 159 |
157 protected: | 160 protected: |
158 std::string name_; | 161 std::string name_; |
159 std::set<std::string> dependencies_; | 162 std::set<std::string> dependencies_; |
160 bool no_parent_; | 163 bool no_parent_; |
161 }; | 164 }; |
162 | 165 |
163 } // namespace extensions | 166 } // namespace extensions |
164 | 167 |
165 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 168 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
OLD | NEW |