blob: e64a19fa6be8bf0b406717a811ad0b1f99fe2b7a [file] [log] [blame]
sfiera635d21d2016-08-04 07:56:091// Copyright 2016 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 COMPONENTS_NTP_TILES_NTP_TILE_H_
6#define COMPONENTS_NTP_TILES_NTP_TILE_H_
7
8#include <vector>
9
10#include "base/files/file_path.h"
11#include "base/macros.h"
12#include "base/strings/string16.h"
treib3168fe02016-12-05 16:20:2513#include "components/ntp_tiles/ntp_tile_source.h"
sfiera635d21d2016-08-04 07:56:0914#include "url/gurl.h"
15
16namespace ntp_tiles {
17
sfiera635d21d2016-08-04 07:56:0918// A suggested site shown on the New Tab Page.
19struct NTPTile {
20 base::string16 title;
21 GURL url;
22 NTPTileSource source;
23
sfiera51fb9812016-12-08 18:36:0224 // 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
26 // is also available from another, higher-priority source.
sfiera635d21d2016-08-04 07:56:0927 base::FilePath whitelist_icon_path;
28
treibbb0c5af52016-12-09 17:34:1529 // 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
sfiera635d21d2016-08-04 07:56:0935 NTPTile();
sfiera08b57f82016-09-22 10:14:2736 NTPTile(const NTPTile&);
sfiera635d21d2016-08-04 07:56:0937 ~NTPTile();
sfiera635d21d2016-08-04 07:56:0938};
39
40using NTPTilesVector = std::vector<NTPTile>;
41
42} // namespace ntp_tiles
43
44#endif // COMPONENTS_NTP_TILES_NTP_TILE_H_