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

Side by Side Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2891103002: [Content suggestions favicons] Let the clients rescale the gfx::Image (Closed)
Patch Set: Friedrich's comments Created 3 years, 7 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
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void OnSignInStateChanged(); 325 void OnSignInStateChanged();
326 326
327 // Re-enables a dismissed category, making querying its provider possible. 327 // Re-enables a dismissed category, making querying its provider possible.
328 void RestoreDismissedCategory(Category category); 328 void RestoreDismissedCategory(Category category);
329 329
330 void RestoreDismissedCategoriesFromPrefs(); 330 void RestoreDismissedCategoriesFromPrefs();
331 void StoreDismissedCategoriesToPrefs(); 331 void StoreDismissedCategoriesToPrefs();
332 332
333 // Get the domain of the suggestion suitable for fetching the favicon. 333 // Get the domain of the suggestion suitable for fetching the favicon.
334 GURL GetFaviconDomain(const ContentSuggestion::ID& suggestion_id); 334 GURL GetFaviconDomain(const ContentSuggestion::ID& suggestion_id);
335
336 // Initiate the fetch of a favicon from the local cache.
337 void GetFaviconFromCache(const GURL& publisher_url,
338 int minimum_size_in_pixel,
339 int desired_size_in_pixel,
340 const ImageFetchedCallback& callback,
341 bool continue_to_google_server);
342
335 // Callbacks for fetching favicons. 343 // Callbacks for fetching favicons.
336 void OnGetFaviconFromCacheFinished( 344 void OnGetFaviconFromCacheFinished(
337 const GURL& publisher_url, 345 const GURL& publisher_url,
338 int minimum_size_in_pixel, 346 int minimum_size_in_pixel,
339 int desired_size_in_pixel, 347 int desired_size_in_pixel,
340 const ImageFetchedCallback& callback, 348 const ImageFetchedCallback& callback,
341 bool continue_to_google_server, 349 bool continue_to_google_server,
342 const favicon_base::LargeIconImageResult& result); 350 const favicon_base::LargeIconImageResult& result);
343 void OnGetFaviconFromGoogleServerFinished( 351 void OnGetFaviconFromGoogleServerFinished(
344 const GURL& publisher_url, 352 const GURL& publisher_url,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 420
413 // Provides order for categories. 421 // Provides order for categories.
414 std::unique_ptr<CategoryRanker> category_ranker_; 422 std::unique_ptr<CategoryRanker> category_ranker_;
415 423
416 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); 424 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService);
417 }; 425 };
418 426
419 } // namespace ntp_snippets 427 } // namespace ntp_snippets
420 428
421 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 429 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698