diff options
Diffstat (limited to 'extensions/common/features')
-rw-r--r-- | extensions/common/features/feature.cc | 6 | ||||
-rw-r--r-- | extensions/common/features/feature.h | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/extensions/common/features/feature.cc b/extensions/common/features/feature.cc index 705f3e5..60f7f88 100644 --- a/extensions/common/features/feature.cc +++ b/extensions/common/features/feature.cc @@ -17,6 +17,12 @@ namespace extensions { Feature::Platform Feature::GetCurrentPlatform() { #if defined(OS_CHROMEOS) return CHROMEOS_PLATFORM; +#elif defined(OS_LINUX) + return LINUX_PLATFORM; +#elif defined(OS_MACOSX) + return MACOSX_PLATFORM; +#elif defined(OS_WIN) + return WIN_PLATFORM; #else return UNSPECIFIED_PLATFORM; #endif diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h index 036fc72..0ffd91d 100644 --- a/extensions/common/features/feature.h +++ b/extensions/common/features/feature.h @@ -20,7 +20,8 @@ class Extension; // Represents a single feature accessible to an extension developer, such as a // top-level manifest key, a permission, or a programmatic API. A feature can // express requirements for where it can be accessed, and supports testing -// support for those requirements. +// support for those requirements. If platforms are not specified, then feature +// is available on all platforms. class Feature { public: // The JavaScript contexts the feature is supported in. @@ -49,7 +50,10 @@ class Feature { // The platforms the feature is supported in. enum Platform { UNSPECIFIED_PLATFORM, - CHROMEOS_PLATFORM + CHROMEOS_PLATFORM, + LINUX_PLATFORM, + MACOSX_PLATFORM, + WIN_PLATFORM }; // Whether a feature is available in a given situation or not, and if not, |