Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / manifest_handlers / linked_app_icons.h
blobec984bebc00e4293c821bc70558beccee922a379
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.
5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
8 #include <vector>
10 #include "extensions/common/extension.h"
11 #include "extensions/common/manifest_handler.h"
13 namespace base {
14 class DictionaryValue;
17 namespace extensions {
19 // A structure to hold the parsed linked app icon data.
20 struct LinkedAppIcons : public Extension::ManifestData {
21 struct IconInfo {
22 IconInfo();
23 ~IconInfo();
25 GURL url;
26 int size;
29 LinkedAppIcons();
30 ~LinkedAppIcons() override;
32 static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension);
34 std::vector<IconInfo> icons;
37 // Parses the "app.linked_icons" manifest key.
38 class LinkedAppIconsHandler : public ManifestHandler {
39 public:
40 LinkedAppIconsHandler();
41 ~LinkedAppIconsHandler() override;
43 bool Parse(Extension* extension, base::string16* error) override;
45 private:
46 const std::vector<std::string> Keys() const override;
48 DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler);
51 } // namespace extensions
53 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_