OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 struct LinkedAppIcons : public Extension::ManifestData { | 21 struct LinkedAppIcons : public Extension::ManifestData { |
22 struct IconInfo { | 22 struct IconInfo { |
23 IconInfo(); | 23 IconInfo(); |
24 ~IconInfo(); | 24 ~IconInfo(); |
25 | 25 |
26 GURL url; | 26 GURL url; |
27 int size; | 27 int size; |
28 }; | 28 }; |
29 | 29 |
30 LinkedAppIcons(); | 30 LinkedAppIcons(); |
| 31 LinkedAppIcons(const LinkedAppIcons& other); |
31 ~LinkedAppIcons() override; | 32 ~LinkedAppIcons() override; |
32 | 33 |
33 static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension); | 34 static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension); |
34 | 35 |
35 std::vector<IconInfo> icons; | 36 std::vector<IconInfo> icons; |
36 }; | 37 }; |
37 | 38 |
38 // Parses the "app.linked_icons" manifest key. | 39 // Parses the "app.linked_icons" manifest key. |
39 class LinkedAppIconsHandler : public ManifestHandler { | 40 class LinkedAppIconsHandler : public ManifestHandler { |
40 public: | 41 public: |
41 LinkedAppIconsHandler(); | 42 LinkedAppIconsHandler(); |
42 ~LinkedAppIconsHandler() override; | 43 ~LinkedAppIconsHandler() override; |
43 | 44 |
44 bool Parse(Extension* extension, base::string16* error) override; | 45 bool Parse(Extension* extension, base::string16* error) override; |
45 | 46 |
46 private: | 47 private: |
47 const std::vector<std::string> Keys() const override; | 48 const std::vector<std::string> Keys() const override; |
48 | 49 |
49 DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler); | 50 DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler); |
50 }; | 51 }; |
51 | 52 |
52 } // namespace extensions | 53 } // namespace extensions |
53 | 54 |
54 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ | 55 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_ |
OLD | NEW |