OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_NTP_TILES_NTP_TILE_H_ | 5 #ifndef COMPONENTS_NTP_TILES_NTP_TILE_H_ |
6 #define COMPONENTS_NTP_TILES_NTP_TILE_H_ | 6 #define COMPONENTS_NTP_TILES_NTP_TILE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "components/ntp_tiles/ntp_tile_source.h" | 13 #include "components/ntp_tiles/ntp_tile_source.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace ntp_tiles { | 16 namespace ntp_tiles { |
17 | 17 |
18 // A suggested site shown on the New Tab Page. | 18 // A suggested site shown on the New Tab Page. |
19 struct NTPTile { | 19 struct NTPTile { |
20 base::string16 title; | 20 base::string16 title; |
21 GURL url; | 21 GURL url; |
22 NTPTileSource source; | 22 NTPTileSource source; |
23 | 23 |
24 // Empty unless whitelists are enabled and this site is in a whitelist. | 24 // Empty unless whitelists are enabled and this site is in a whitelist. |
25 // However, may be non-empty even if |source| is not |WHITELIST|, if this tile | 25 // However, may be non-empty even if |source| is not |WHITELIST|, if this tile |
26 // is also available from another, higher-priority source. | 26 // is also available from another, higher-priority source. |
27 base::FilePath whitelist_icon_path; | 27 base::FilePath whitelist_icon_path; |
28 | 28 |
| 29 // Only valid for source == SUGGESTIONS_SERVICE (empty otherwise). |
| 30 // May point to a local chrome:// URL or to a remote one. May be empty. |
| 31 GURL thumbnail_url; |
| 32 // This won't be empty, but might 404 etc. |
| 33 GURL favicon_url; |
| 34 |
29 NTPTile(); | 35 NTPTile(); |
30 NTPTile(const NTPTile&); | 36 NTPTile(const NTPTile&); |
31 ~NTPTile(); | 37 ~NTPTile(); |
32 }; | 38 }; |
33 | 39 |
34 using NTPTilesVector = std::vector<NTPTile>; | 40 using NTPTilesVector = std::vector<NTPTile>; |
35 | 41 |
36 } // namespace ntp_tiles | 42 } // namespace ntp_tiles |
37 | 43 |
38 #endif // COMPONENTS_NTP_TILES_NTP_TILE_H_ | 44 #endif // COMPONENTS_NTP_TILES_NTP_TILE_H_ |
OLD | NEW |