Index: extensions/common/features/feature.h |
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h |
index a570b9a93f7f62db0bd4cf2880551303635fdf03..b889ef8d53913274a9740de383d47952d2095de6 100644 |
--- a/extensions/common/features/feature.h |
+++ b/extensions/common/features/feature.h |
@@ -53,6 +53,19 @@ class Feature { |
SERVICE_WORKER_CONTEXT, |
}; |
+ // Classes of session types to which features can be restricted in feature |
+ // files. The session type describes session based on the type of user that is |
+ // active in the current session. |
+ enum SessionType { |
+ SESSION_TYPE_UNSPECIFIED, |
+ // Regular session, i.e. non kiosk app. |
+ SESSION_TYPE_REGULAR, |
+ // Kiosk app session. |
+ SESSION_TYPE_KIOSK, |
+ // Helper for determining max enum value - not used as a real type. |
+ SESSION_TYPE_MAX = SESSION_TYPE_KIOSK |
+ }; |
+ |
// The platforms the feature is supported in. |
enum Platform { |
UNSPECIFIED_PLATFORM, |
@@ -136,11 +149,14 @@ class Feature { |
// extension and context. |
Availability IsAvailableToContext(const Extension* extension, |
Context context, |
+ SessionType session_type, |
const GURL& url) const { |
- return IsAvailableToContext(extension, context, url, GetCurrentPlatform()); |
+ return IsAvailableToContext(extension, context, session_type, url, |
+ GetCurrentPlatform()); |
} |
virtual Availability IsAvailableToContext(const Extension* extension, |
Context context, |
+ SessionType session_type, |
const GURL& url, |
Platform platform) const = 0; |