Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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. | |
| 4 | |
| 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ | |
| 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "extensions/common/extension.h" | |
| 12 #include "extensions/common/manifest.h" | |
| 13 #include "extensions/common/manifest_handler.h" | |
| 14 | |
| 15 namespace extensions { | |
| 16 | |
| 17 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.
| |
| 18 public: | |
| 19 explicit KioskSecondaryAppsInfo(const std::vector<std::string>& app_ids); | |
| 20 ~KioskSecondaryAppsInfo() override; | |
| 21 | |
| 22 // Returns true if there are kiosk secondary apps. | |
| 23 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.
| |
| 24 | |
| 25 // Gets the KioskSecondaryAppsInfo for |extension|, or NULL if none was | |
| 26 // specified. | |
| 27 static KioskSecondaryAppsInfo* Get(const Extension* extension); | |
| 28 | |
| 29 static scoped_ptr<KioskSecondaryAppsInfo> Create(Extension* extension, | |
| 30 base::string16* error); | |
| 31 | |
| 32 // The IDs of the kiosk secondary apps. | |
| 33 const std::vector<std::string> ids; | |
| 34 }; | |
| 35 | |
| 36 // Parses the "kiosk_secondary_apps" key and its sub keys. | |
| 37 class KioskSecondaryAppsHandler : public ManifestHandler { | |
| 38 public: | |
| 39 KioskSecondaryAppsHandler(); | |
| 40 ~KioskSecondaryAppsHandler() override; | |
| 41 | |
| 42 bool Parse(Extension* extension, base::string16* error) override; | |
| 43 | |
| 44 private: | |
| 45 const std::vector<std::string> Keys() const override; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(KioskSecondaryAppsHandler); | |
| 48 }; | |
| 49 | |
| 50 } // namespace extensions | |
| 51 | |
| 52 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_KIOSK_SECONDARY_APPS_INFO_H_ | |
| OLD | NEW |