| Index: chrome/common/favicon/fallback_icon_url_parser.h
|
| diff --git a/chrome/common/favicon/fallback_icon_url_parser.h b/chrome/common/favicon/fallback_icon_url_parser.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e4ce3b61e2eaf9e636c6fa61ef6b7c31822714f1
|
| --- /dev/null
|
| +++ b/chrome/common/favicon/fallback_icon_url_parser.h
|
| @@ -0,0 +1,45 @@
|
| +// 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_FAVICON_FALLBACK_ICON_URL_PARSER_H_
|
| +#define CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "components/favicon_base/favicon_types.h"
|
| +#include "third_party/skia/include/core/SkColor.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +struct ParsedFallbackIconPath {
|
| + // The page URL the fallback icon is requested for.
|
| + std::string url;
|
| +
|
| + // The size of the requested fallback icon in pixels.
|
| + int size_in_pixels;
|
| +
|
| + // Styling specifications of fallback icon.
|
| + favicon_base::FallbackIconStyle style;
|
| +};
|
| +
|
| +// Parses a color in "RGB", "RRGGBB", or "RRGGBBAA" format. Returns true on
|
| +// success.
|
| +bool ParseIconColor(const std::string& str, SkColor* color);
|
| +
|
| +
|
| +// Parses |specs_str|, which should be the comma-separated value portion
|
| +// in the format described at the top of the file
|
| +// "chrome/browser/ui/webui/fallback_icon_source.h".
|
| +bool ParseFallbackIconSpecs(const std::string& specs_str,
|
| + int *size,
|
| + favicon_base::FallbackIconStyle* style);
|
| +
|
| +// Parses |path|, which should be in the format described at the top of the
|
| +// file "chrome/browser/ui/webui/fallback_icon_source.h".
|
| +bool ParseFallbackIconPath(const std::string& path,
|
| + ParsedFallbackIconPath* parsed);
|
| +
|
| +} // namespace chrome
|
| +
|
| +#endif // CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_
|
|
|