Properly attach InfoBarContainer when it is swapped to a new WebContents
[chromium-blink-merge.git] / chrome / common / extensions / api / supervised_user_private / supervised_user_handler.h
blob6383523cc08013bd54933e6f46e48dcef658e110
1 // Copyright 2014 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 CHROME_COMMON_EXTENSIONS_API_SUPERVISED_USER_PRIVATE_SUPERVISED_USER_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_SUPERVISED_USER_PRIVATE_SUPERVISED_USER_HANDLER_H_
8 #include <string>
10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "extensions/common/extension.h"
13 #include "extensions/common/extension_resource.h"
14 #include "extensions/common/manifest.h"
15 #include "extensions/common/manifest_handler.h"
17 namespace extensions {
19 struct SupervisedUserInfo : public Extension::ManifestData {
20 SupervisedUserInfo();
21 ~SupervisedUserInfo() override;
23 static bool IsContentPack(const Extension* extension);
24 static ExtensionResource GetContentPackSiteList(const Extension* extension);
26 // A file containing a list of sites for a supervised user.
27 base::FilePath site_list;
30 // Parses the "content_pack" manifest key for a supervised user.
31 class SupervisedUserHandler : public ManifestHandler {
32 public:
33 SupervisedUserHandler();
34 ~SupervisedUserHandler() override;
36 bool Parse(Extension* extension, base::string16* error) override;
38 private:
39 const std::vector<std::string> Keys() const override;
41 bool LoadSites(SupervisedUserInfo* info,
42 const base::DictionaryValue* content_pack_value,
43 base::string16* error);
44 bool LoadConfigurations(SupervisedUserInfo* info,
45 const base::DictionaryValue* content_pack_value,
46 base::string16* error);
48 DISALLOW_COPY_AND_ASSIGN(SupervisedUserHandler);
51 } // namespace extensions
53 #endif // CHROME_COMMON_EXTENSIONS_API_SUPERVISED_USER_PRIVATE_SUPERVISED_USER_HANDLER_H_