| 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_SIMPLE_FEATURE_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ | 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/common/chrome_version_info.h" | 12 #include "chrome/common/chrome_version_info.h" |
| 13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
| 14 #include "chrome/common/extensions/features/feature.h" | 14 #include "chrome/common/extensions/features/feature.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class ComplexFeature; | 18 class ComplexFeature; |
| 19 | 19 |
| 20 class SimpleFeature : public Feature { | 20 class SimpleFeature : public Feature { |
| 21 public: | 21 public: |
| 22 SimpleFeature(); | 22 SimpleFeature(); |
| 23 SimpleFeature(const SimpleFeature& other); | 23 SimpleFeature(const SimpleFeature& other); |
| 24 SimpleFeature(Feature* feature); |
| 24 virtual ~SimpleFeature(); | 25 virtual ~SimpleFeature(); |
| 25 | 26 |
| 26 std::set<std::string>* whitelist() { return &whitelist_; } | 27 std::set<std::string>* whitelist() { return &whitelist_; } |
| 27 std::set<Extension::Type>* extension_types() { return &extension_types_; } | 28 std::set<Extension::Type>* extension_types() { return &extension_types_; } |
| 28 | 29 |
| 29 // Parses the JSON representation of a feature into the fields of this object. | 30 // Parses the JSON representation of a feature into the fields of this object. |
| 30 // Unspecified values in the JSON are not modified in the object. This allows | 31 // Unspecified values in the JSON are not modified in the object. This allows |
| 31 // us to implement inheritance by parsing one value after another. | 32 // us to implement inheritance by parsing one value after another. |
| 32 void Parse(const DictionaryValue* value); | 33 void Parse(const DictionaryValue* value); |
| 33 | 34 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 int min_manifest_version_; | 90 int min_manifest_version_; |
| 90 int max_manifest_version_; | 91 int max_manifest_version_; |
| 91 chrome::VersionInfo::Channel channel_; | 92 chrome::VersionInfo::Channel channel_; |
| 92 | 93 |
| 93 FRIEND_TEST_ALL_PREFIXES(ExtensionSimpleFeatureTest, Context); | 94 FRIEND_TEST_ALL_PREFIXES(ExtensionSimpleFeatureTest, Context); |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 } // namespace extensions | 97 } // namespace extensions |
| 97 | 98 |
| 98 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ | 99 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| OLD | NEW |