Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: chrome/common/favicon/fallback_icon_url_parser.h

Issue 835903005: [Favicon] Add new fallback icon rendering flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing FallbackIconStyleBuilder; trimming down chrome://fallback-icon syntax. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698