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

Side by Side Diff: extensions/common/features/feature.h

Issue 414633002: Remove service worker concepts from _api_features.json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const std::string& name() const { return name_; } 104 const std::string& name() const { return name_; }
105 void set_name(const std::string& name) { name_ = name; } 105 void set_name(const std::string& name) { name_ = name; }
106 bool no_parent() const { return no_parent_; } 106 bool no_parent() const { return no_parent_; }
107 107
108 // Gets the platform the code is currently running on. 108 // Gets the platform the code is currently running on.
109 static Platform GetCurrentPlatform(); 109 static Platform GetCurrentPlatform();
110 110
111 // Tests whether this is an internal API or not. 111 // Tests whether this is an internal API or not.
112 virtual bool IsInternal() const = 0; 112 virtual bool IsInternal() const = 0;
113 113
114 // Returns True for features excluded from service worker backed contexts.
115 virtual bool IsBlockedInServiceWorker() const = 0;
116
117 // Returns true if the feature is available to be parsed into a new extension 114 // Returns true if the feature is available to be parsed into a new extension
118 // manifest. 115 // manifest.
119 Availability IsAvailableToManifest(const std::string& extension_id, 116 Availability IsAvailableToManifest(const std::string& extension_id,
120 Manifest::Type type, 117 Manifest::Type type,
121 Manifest::Location location, 118 Manifest::Location location,
122 int manifest_version) const { 119 int manifest_version) const {
123 return IsAvailableToManifest(extension_id, type, location, manifest_version, 120 return IsAvailableToManifest(extension_id, type, location, manifest_version,
124 GetCurrentPlatform()); 121 GetCurrentPlatform());
125 } 122 }
126 virtual Availability IsAvailableToManifest(const std::string& extension_id, 123 virtual Availability IsAvailableToManifest(const std::string& extension_id,
(...skipping 26 matching lines...) Expand all
153 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; 150 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0;
154 151
155 protected: 152 protected:
156 std::string name_; 153 std::string name_;
157 bool no_parent_; 154 bool no_parent_;
158 }; 155 };
159 156
160 } // namespace extensions 157 } // namespace extensions
161 158
162 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ 159 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_
OLDNEW
« no previous file with comments | « extensions/common/features/complex_feature_unittest.cc ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698