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 CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "extensions/common/extension.h" | |
11 #include "extensions/common/manifest_handler.h" | |
12 | |
13 namespace base { | |
14 class DictionaryValue; | |
15 } | |
16 | |
17 namespace extensions { | |
18 | |
19 // A structure to hold the parsed app icon color data. | |
calamity
2015/04/24 05:05:40
parsed linked app icon data.
benwells
2015/04/27 09:54:54
Done.
| |
20 struct LinkedAppIcons : public Extension::ManifestData { | |
21 struct IconInfo { | |
22 IconInfo(); | |
23 ~IconInfo(); | |
24 | |
25 GURL url; | |
26 int size; | |
27 }; | |
28 | |
29 LinkedAppIcons(); | |
30 ~LinkedAppIcons() override; | |
31 | |
32 static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension); | |
33 | |
34 std::vector<IconInfo> icons; | |
35 }; | |
36 | |
37 // Parses the "app.linked_icons" manifest key. | |
38 class LinkedAppIconsHandler : public ManifestHandler { | |
39 public: | |
40 LinkedAppIconsHandler(); | |
41 ~LinkedAppIconsHandler() override; | |
42 | |
43 bool Parse(Extension* extension, base::string16* error) override; | |
44 | |
45 private: | |
46 const std::vector<std::string> Keys() const override; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler); | |
49 }; | |
50 | |
51 } // namespace extensions | |
52 | |
53 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | |
OLD | NEW |