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

Unified Diff: chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h

Issue 795863002: [AppList] Use local favicons/icons with URLSuggestionResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nits Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
diff --git a/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h b/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
index 6152ada0100e059124a639d990f33cb56b88f59a..dc39f23a907a17cef891860d7af262a3a13b2759 100644
--- a/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
+++ b/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
@@ -6,14 +6,20 @@
#define CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_URL_SUGGESTION_RESULT_H_
#include "base/memory/scoped_ptr.h"
+#include "base/task/cancelable_task_tracker.h"
#include "components/suggestions/proto/suggestions.pb.h"
#include "ui/app_list/search_result.h"
class AppListControllerDelegate;
+class FaviconService;
class GURL;
class Profile;
class SkBitmap;
+namespace favicon_base {
+struct FaviconRawBitmapResult;
+} // namespace favicon_base
+
namespace suggestions {
class SuggestionsService;
} // namespace suggestions
@@ -22,10 +28,11 @@ namespace app_list {
class URLSuggestionResult : public SearchResult {
public:
- // |suggestion| is copied to a local member, because this SuggestionResult is
- // expected to live longer that |suggestions|.
+ // |suggestion| is copied to a local member, because this URLSuggestionResult
+ // is expected to live longer that |suggestion|.
URLSuggestionResult(Profile* profile,
AppListControllerDelegate* list_controller,
+ FaviconService* favicon_service,
suggestions::SuggestionsService* suggestions_service,
const suggestions::ChromeSuggestion& suggestion);
~URLSuggestionResult() override;
@@ -39,12 +46,16 @@ class URLSuggestionResult : public SearchResult {
private:
void UpdateIcon();
+ void OnDidGetIcon(
+ const favicon_base::FaviconRawBitmapResult& bitmap_result);
void OnSuggestionsThumbnailAvailable(const GURL& url, const SkBitmap* bitmap);
Profile* profile_;
AppListControllerDelegate* list_controller_;
+ FaviconService* favicon_service_;
suggestions::SuggestionsService* suggestions_service_;
suggestions::ChromeSuggestion suggestion_;
+ scoped_ptr<base::CancelableTaskTracker> cancelable_task_tracker_;
// For callbacks that may be run after destruction.
base::WeakPtrFactory<URLSuggestionResult> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698