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_FAVICON_FALLBACK_ICON_URL_PARSER_H_ | |
6 #define CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_ | |
7 | |
8 #include <string> | |
9 | |
pkotwicz
2015/01/23 16:00:47
Nit: No need to include favicon_types.h
huangs
2015/01/23 19:47:51
Need this for favicon_base::FallbackIconStyle , wh
| |
10 #include "components/favicon_base/favicon_types.h" | |
11 #include "third_party/skia/include/core/SkColor.h" | |
12 | |
13 namespace chrome { | |
14 | |
15 struct ParsedFallbackIconPath { | |
16 // The URL from which the fallback icon is being requested. | |
pkotwicz
2015/01/23 16:00:47
How about: "The page URL the fallback icon is requ
huangs
2015/01/23 19:47:51
Done.
| |
17 std::string url; | |
18 | |
19 // The size of the requested fallback icon in pixels. | |
20 int size_in_pixels; | |
21 | |
22 // Specifications of fallback icon. This is nullptr if no fallback. | |
pkotwicz
2015/01/23 16:00:47
Remove the part about the nullptr because it is no
huangs
2015/01/23 19:47:51
Done.
| |
23 favicon_base::FallbackIconStyle style; | |
24 }; | |
25 | |
26 // Parses a color in "RGB", "RRGGBB", or "RRGGBBAA" format. Returns true on | |
27 // success. | |
28 bool ParseIconColor(const std::string& str, SkColor* color); | |
29 | |
30 | |
31 // Parses |specs_str|, which should be the comma-separated value portion | |
32 // in the format described at the top of the file | |
33 // "chrome/browser/ui/webui/fallback_icon_source.h". | |
34 bool ParseFallbackIconSpecs(const std::string& specs_str, | |
35 int *size, | |
36 favicon_base::FallbackIconStyle* style); | |
37 | |
38 // Parses |path|, which should be in the format described at the top of the | |
39 // file "chrome/browser/ui/webui/fallback_icon_source.h". | |
40 bool ParseFallbackIconPath(const std::string& path, | |
41 ParsedFallbackIconPath* parsed); | |
42 | |
43 } // namespace chrome | |
44 | |
45 #endif // CHROME_COMMON_FAVICON_FALLBACK_ICON_URL_PARSER_H_ | |
OLD | NEW |