blob: 32845384e44452ac40a9af483e1f9664a56cc515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
#include <vector>
#include "base/macros.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handler.h"
namespace extensions {
// A structure to hold the parsed linked app icon data.
struct LinkedAppIcons : public Extension::ManifestData {
struct IconInfo {
IconInfo();
~IconInfo();
GURL url;
int size;
};
LinkedAppIcons();
LinkedAppIcons(const LinkedAppIcons& other);
~LinkedAppIcons() override;
static const LinkedAppIcons& GetLinkedAppIcons(const Extension* extension);
std::vector<IconInfo> icons;
};
// Parses the "app.linked_icons" manifest key.
class LinkedAppIconsHandler : public ManifestHandler {
public:
LinkedAppIconsHandler();
~LinkedAppIconsHandler() override;
bool Parse(Extension* extension, base::string16* error) override;
private:
base::span<const char* const> Keys() const override;
DISALLOW_COPY_AND_ASSIGN(LinkedAppIconsHandler);
};
} // namespace extensions
#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_LINKED_APP_ICONS_H_
|