OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_WEB_PUBLIC_FAVICON_URL_ | 5 #ifndef IOS_WEB_PUBLIC_FAVICON_URL_ |
6 #define IOS_WEB_PUBLIC_FAVICON_URL_ | 6 #define IOS_WEB_PUBLIC_FAVICON_URL_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 namespace base { | |
14 class ListValue; | |
15 } | |
16 | |
13 namespace web { | 17 namespace web { |
14 | 18 |
15 // The favicon url from the render. | 19 // The favicon url from the render. |
16 struct FaviconURL { | 20 struct FaviconURL { |
17 // The icon type in a page. The definition must be same as | 21 // The icon type in a page. The definition must be same as |
18 // favicon_base::IconType. | 22 // favicon_base::IconType. |
19 enum IconType { | 23 enum IconType { |
20 INVALID_ICON = 0x0, | 24 INVALID_ICON = 0x0, |
21 FAVICON = 1 << 0, | 25 FAVICON = 1 << 0, |
22 TOUCH_ICON = 1 << 1, | 26 TOUCH_ICON = 1 << 1, |
(...skipping 10 matching lines...) Expand all Loading... | |
33 // The url of the icon. | 37 // The url of the icon. |
34 GURL icon_url; | 38 GURL icon_url; |
35 | 39 |
36 // The type of the icon | 40 // The type of the icon |
37 IconType icon_type; | 41 IconType icon_type; |
38 | 42 |
39 // Icon's bitmaps' size | 43 // Icon's bitmaps' size |
40 std::vector<gfx::Size> icon_sizes; | 44 std::vector<gfx::Size> icon_sizes; |
41 }; | 45 }; |
42 | 46 |
47 // Extract the favicons stored in |favicons| using the format: [ {"href": | |
48 // the_url, "rel": favicon_type}, ...] and store them in |result_urls|. | |
49 bool ExtractFaviconURL(base::ListValue* favicons, | |
Eugene But (OOO till 7-30)
2016/11/30 18:51:31
Do we need this as a part of public API? WebStateO
| |
50 std::vector<web::FaviconURL>& result_urls); | |
kkhorimoto
2016/11/28 23:48:26
The style guide dictates that out-parameters shoul
| |
51 | |
43 } // namespace web | 52 } // namespace web |
44 | 53 |
45 #endif // IOS_WEB_PUBLIC_FAVICON_URL_ | 54 #endif // IOS_WEB_PUBLIC_FAVICON_URL_ |
OLD | NEW |