Chromium Code Reviews| Index: extensions/common/manifest_handlers/kiosk_secondary_apps_info.h |
| diff --git a/extensions/common/manifest_handlers/kiosk_secondary_apps_info.h b/extensions/common/manifest_handlers/kiosk_secondary_apps_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6b01d406c309d10f17a4d7efa10ae3ff17428d4b |
| --- /dev/null |
| +++ b/extensions/common/manifest_handlers/kiosk_secondary_apps_info.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ |
| +#define EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "extensions/common/extension.h" |
| +#include "extensions/common/manifest.h" |
| +#include "extensions/common/manifest_handler.h" |
| + |
| +namespace extensions { |
| + |
| +struct KioskSecondaryAppsInfo : public Extension::ManifestData { |
| + public: |
| + explicit KioskSecondaryAppsInfo(const std::vector<std::string>& app_ids); |
| + ~KioskSecondaryAppsInfo() override; |
| + |
| + // Returns true if there are kiosk secondary apps. |
| + static bool HaveSecondaryApps(const Extension* extension); |
| + |
| + // Gets the KioskSecondaryAppsInfo for |extension|, or NULL if none was |
| + // specified. |
| + static KioskSecondaryAppsInfo* Get(const Extension* extension); |
| + |
| + // The IDs of the kiosk secondary apps. |
| + const std::vector<std::string> ids; |
| +}; |
| + |
| +// Parses the "kiosk_enabled" and "kiosk_only" manifest keys. |
|
xiyuan
2015/08/26 18:16:17
nit: update this?
jennyz
2015/08/28 18:24:08
Done.
|
| +class KioskSecondaryAppsHandler : public ManifestHandler { |
| + public: |
| + KioskSecondaryAppsHandler(); |
| + ~KioskSecondaryAppsHandler() override; |
| + |
| + bool Parse(Extension* extension, base::string16* error) override; |
| + |
| + private: |
| + const std::vector<std::string> Keys() const override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(KioskSecondaryAppsHandler); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ |