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

Side by Side Diff: components/ntp_tiles/popular_sites.h

Issue 2695713004: Add baked-in favicons for default popular sites on NTP (Closed)
Patch Set: Rebase. Created 3 years, 9 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_POPULAR_SITES_H_ 5 #ifndef COMPONENTS_NTP_TILES_POPULAR_SITES_H_
6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_H_ 6 #define COMPONENTS_NTP_TILES_POPULAR_SITES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 const GURL& large_icon_url, 30 const GURL& large_icon_url,
31 const GURL& thumbnail_url); 31 const GURL& thumbnail_url);
32 Site(const Site& other); 32 Site(const Site& other);
33 ~Site(); 33 ~Site();
34 34
35 base::string16 title; 35 base::string16 title;
36 GURL url; 36 GURL url;
37 GURL favicon_url; 37 GURL favicon_url;
38 GURL large_icon_url; 38 GURL large_icon_url;
39 GURL thumbnail_url; 39 GURL thumbnail_url;
40 int default_icon_resource; // < 0 if there is none. Used for popular sites.
40 }; 41 };
41 42
42 using SitesVector = std::vector<Site>; 43 using SitesVector = std::vector<Site>;
43 using FinishedCallback = base::Callback<void(bool /* success */)>; 44 using FinishedCallback = base::Callback<void(bool /* success */)>;
44 45
45 virtual ~PopularSites() = default; 46 virtual ~PopularSites() = default;
46 47
47 // May start the process of retrieving popular sites. If an actual download 48 // May start the process of retrieving popular sites. If an actual download
48 // gets triggered, returns true and invokes |callback| with the result, on the 49 // gets triggered, returns true and invokes |callback| with the result, on the
49 // same thread as the caller. Never invokes |callback| before returning 50 // same thread as the caller. Never invokes |callback| before returning
(...skipping 16 matching lines...) Expand all
66 virtual GURL GetLastURLFetched() const = 0; 67 virtual GURL GetLastURLFetched() const = 0;
67 virtual GURL GetURLToFetch() = 0; 68 virtual GURL GetURLToFetch() = 0;
68 virtual std::string GetCountryToFetch() = 0; 69 virtual std::string GetCountryToFetch() = 0;
69 virtual std::string GetVersionToFetch() = 0; 70 virtual std::string GetVersionToFetch() = 0;
70 virtual const base::ListValue* GetCachedJson() = 0; 71 virtual const base::ListValue* GetCachedJson() = 0;
71 }; 72 };
72 73
73 } // namespace ntp_tiles 74 } // namespace ntp_tiles
74 75
75 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_H_ 76 #endif // COMPONENTS_NTP_TILES_POPULAR_SITES_H_
OLDNEW
« no previous file with comments | « components/ntp_tiles/most_visited_sites_unittest.cc ('k') | components/ntp_tiles/popular_sites_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698