Chromium Code Reviews| Index: chrome/common/extensions/manifest_handlers/kiosk_mode_info.h |
| diff --git a/chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h b/chrome/common/extensions/manifest_handlers/kiosk_mode_info.h |
| similarity index 53% |
| rename from chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h |
| rename to chrome/common/extensions/manifest_handlers/kiosk_mode_info.h |
| index 3c61b08e97d2578106417f7a370b70886c99b377..078d4975f97b0c6759bca6d1112e82896cf35e8e 100644 |
| --- a/chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h |
| +++ b/chrome/common/extensions/manifest_handlers/kiosk_mode_info.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_ENABLED_INFO_H_ |
| -#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_ENABLED_INFO_H_ |
| +#ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_ |
| +#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_ |
| #include <string> |
| #include <vector> |
| @@ -24,19 +24,32 @@ struct KioskEnabledInfo : public Extension::ManifestData { |
| static bool IsKioskEnabled(const Extension* extension); |
| }; |
|
not at google - send to devlin
2013/09/24 18:35:17
consider replacing these with an enum:
// somethi
Tim Song
2013/09/24 18:50:01
I considered this, but an issue arises when callin
not at google - send to devlin
2013/09/24 18:55:17
I think this is fine; I CC'ed Yoyo who is the mani
Tim Song
2013/09/24 19:09:06
Alright, then we'll just have one ManifestData for
|
| -// Parses the "kiosk_enabled" manifest key. |
| -class KioskEnabledHandler : public ManifestHandler { |
| +struct KioskOnlyInfo : public Extension::ManifestData { |
| + explicit KioskOnlyInfo(bool is_kiosk_only); |
| + virtual ~KioskOnlyInfo(); |
| + |
| + bool kiosk_only; |
| + |
| + // Whether the extension or app should only be available in kiosk mode. |
| + static bool IsKioskOnly(const Extension* extension); |
| +}; |
| + |
| +// Parses the "kiosk_enabled" and "kiosk_only" manifest keys. |
| +class KioskModeHandler : public ManifestHandler { |
| public: |
| - KioskEnabledHandler(); |
| - virtual ~KioskEnabledHandler(); |
| + KioskModeHandler(); |
| + virtual ~KioskModeHandler(); |
| virtual bool Parse(Extension* extension, string16* error) OVERRIDE; |
| + |
| private: |
| virtual const std::vector<std::string> Keys() const OVERRIDE; |
| - DISALLOW_COPY_AND_ASSIGN(KioskEnabledHandler); |
| + std::vector<std::string> supported_keys_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(KioskModeHandler); |
| }; |
| } // namespace extensions |
| -#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_ENABLED_INFO_H_ |
| +#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_KIOSK_MODE_INFO_H_ |