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

Side by Side Diff: chrome/common/favicon_url_parser.h

Issue 15388002: Supporting high dpi favicons in Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Samarth's comments Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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_URL_PARSER_H_
6 #define CHROME_COMMON_FAVICON_URL_PARSER_H_
7
8 #include <string>
9
10 #include "ui/base/layout.h"
11
12 namespace chrome {
13
14 struct ParsedFaviconPath {
samarth 2013/06/20 00:31:29 Document the fields here, rather than below.
pedro (no code reviews) 2013/06/20 22:43:45 Done.
15 bool is_icon_url;
16 std::string url;
17 int size_in_dip;
18 ui::ScaleFactor scale_factor;
19 size_t path_index;
20 };
21
22 // Parses |path|, which should be in the format described at the top of the
23 // file "chrome/browser/ui/webui/favicon_source.h". |icon_types| indicates
24 // which icon types are supported. Returns true if |path| could be parsed.
25 // The result of the parsing will be stored in a ParsedFaviconPath struct.
26 //
27 // This function will return a struct containing the following information:
28 //
29 // is_icon_url - whether the URL has the "iconurl" parameter.
30 // url - the URL from which the favicon is being requested.
31 // size_in_dip - the size of the requested favicon
32 // scale_factor - the scale factor of the requested favicon
33 // path_index - the index of the first character (relative to the path)
34 // where the the URL from which the favicon is being requested
35 // is located.
36 bool ParseFaviconPath(const std::string& path,
37 int icon_types,
38 ParsedFaviconPath* parsed);
39
40 } // namespace chrome
41
42 #endif // CHROME_COMMON_FAVICON_URL_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698