| Index: chrome/common/extensions/manifest_handlers/app_icon_color_info.h
|
| diff --git a/chrome/common/extensions/manifest_handlers/app_icon_color_info.h b/chrome/common/extensions/manifest_handlers/app_icon_color_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e44e301ab52764c05019fc9e229204a9030bc5ba
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/manifest_handlers/app_icon_color_info.h
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2014 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_APP_ICON_COLOR_INFO_H_
|
| +#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_ICON_COLOR_INFO_H_
|
| +
|
| +#include "extensions/common/extension.h"
|
| +#include "extensions/common/manifest_handler.h"
|
| +#include "third_party/skia/include/core/SkColor.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| +namespace extensions {
|
| +
|
| +// A structure to hold the parsed app icon color data.
|
| +struct AppIconColorInfo : public Extension::ManifestData {
|
| + AppIconColorInfo();
|
| + ~AppIconColorInfo() override;
|
| +
|
| + static SkColor GetIconColor(const Extension* extension);
|
| + static const std::string& GetIconColorString(const Extension* extension);
|
| +
|
| + // The color to use if icons need to be generated for the app.
|
| + SkColor icon_color_;
|
| +
|
| + // The string representation of the icon color.
|
| + std::string icon_color_string_;
|
| +};
|
| +
|
| +// Parses the "app.icon_color" manifest key.
|
| +class AppIconColorHandler : public ManifestHandler {
|
| + public:
|
| + AppIconColorHandler();
|
| + ~AppIconColorHandler() override;
|
| +
|
| + bool Parse(Extension* extension, base::string16* error) override;
|
| +
|
| + private:
|
| + const std::vector<std::string> Keys() const override;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AppIconColorHandler);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_APP_ICON_COLOR_INFO_H_
|
|
|