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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_
11 #include "extensions/common/extension.h"
12 #include "extensions/common/manifest.h"
13 #include "extensions/common/manifest_handler.h"
15 namespace extensions
{
17 struct KioskModeInfo
: public Extension::ManifestData
{
25 explicit KioskModeInfo(KioskStatus kiosk_status
);
26 ~KioskModeInfo() override
;
28 KioskStatus kiosk_status
;
30 // Whether the extension or app is enabled for app kiosk mode.
31 static bool IsKioskEnabled(const Extension
* extension
);
33 // Whether the extension or app should only be available in kiosk mode.
34 static bool IsKioskOnly(const Extension
* extension
);
37 // Parses the "kiosk_enabled" and "kiosk_only" manifest keys.
38 class KioskModeHandler
: public ManifestHandler
{
41 ~KioskModeHandler() override
;
43 bool Parse(Extension
* extension
, base::string16
* error
) override
;
46 const std::vector
<std::string
> Keys() const override
;
48 std::vector
<std::string
> supported_keys_
;
50 DISALLOW_COPY_AND_ASSIGN(KioskModeHandler
);
53 } // namespace extensions
55 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_