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..971c145576fb88b79507eab66745502ae01dd54a |
--- /dev/null |
+++ b/extensions/common/manifest_handlers/kiosk_secondary_apps_info.h |
@@ -0,0 +1,52 @@ |
+// 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 { |
not at google - send to devlin
2015/08/31 18:11:52
Should this all be in the KioskModeInfo manifest h
jennyz
2015/08/31 23:57:25
Done.
|
+ 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); |
not at google - send to devlin
2015/08/31 18:11:52
// Returns true if |extension| declares secondary
jennyz
2015/08/31 23:57:25
Done.
|
+ |
+ // Gets the KioskSecondaryAppsInfo for |extension|, or NULL if none was |
+ // specified. |
+ static KioskSecondaryAppsInfo* Get(const Extension* extension); |
+ |
+ static scoped_ptr<KioskSecondaryAppsInfo> Create(Extension* extension, |
+ base::string16* error); |
+ |
+ // The IDs of the kiosk secondary apps. |
+ const std::vector<std::string> ids; |
+}; |
+ |
+// Parses the "kiosk_secondary_apps" key and its sub keys. |
+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_ |