Ignore non-active fullscreen windows for shelf state.
[chromium-blink-merge.git] / extensions / common / manifest_handlers / kiosk_mode_info.h
blobe98fa31559b1045a73f6e0382b68f021669bf44c
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_
8 #include <string>
9 #include <vector>
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 {
18 public:
19 enum KioskStatus {
20 NONE,
21 ENABLED,
22 ONLY
25 explicit KioskModeInfo(KioskStatus kiosk_status);
26 virtual ~KioskModeInfo();
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 {
39 public:
40 KioskModeHandler();
41 virtual ~KioskModeHandler();
43 virtual bool Parse(Extension* extension, string16* error) OVERRIDE;
45 private:
46 virtual 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_