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

Side by Side Diff: chrome/browser/extensions/favicon_downloader.h

Issue 2662443005: Convert FaviconDownloader to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void FetchIcons(const std::vector<GURL>& urls); 64 void FetchIcons(const std::vector<GURL>& urls);
65 65
66 // Icon download callback. 66 // Icon download callback.
67 void DidDownloadFavicon(int id, 67 void DidDownloadFavicon(int id,
68 int http_status_code, 68 int http_status_code,
69 const GURL& image_url, 69 const GURL& image_url,
70 const std::vector<SkBitmap>& bitmaps, 70 const std::vector<SkBitmap>& bitmaps,
71 const std::vector<gfx::Size>& original_bitmap_sizes); 71 const std::vector<gfx::Size>& original_bitmap_sizes);
72 72
73 // content::WebContentsObserver overrides: 73 // content::WebContentsObserver overrides:
74 void DidNavigateMainFrame( 74 void DidFinishNavigation(
75 const content::LoadCommittedDetails& details, 75 content::NavigationHandle* navigation_handle) override;
76 const content::FrameNavigateParams& params) override;
77 void DidUpdateFaviconURL( 76 void DidUpdateFaviconURL(
78 const std::vector<content::FaviconURL>& candidates) override; 77 const std::vector<content::FaviconURL>& candidates) override;
79 78
80 // Whether we need to fetch favicons from the renderer. 79 // Whether we need to fetch favicons from the renderer.
81 bool need_favicon_urls_; 80 bool need_favicon_urls_;
82 81
83 // URLs that aren't given by WebContentsObserver::DidUpdateFaviconURL() that 82 // URLs that aren't given by WebContentsObserver::DidUpdateFaviconURL() that
84 // should be used for this favicon. This is necessary in order to get touch 83 // should be used for this favicon. This is necessary in order to get touch
85 // icons on non-android environments. 84 // icons on non-android environments.
86 std::vector<GURL> extra_favicon_urls_; 85 std::vector<GURL> extra_favicon_urls_;
(...skipping 10 matching lines...) Expand all
97 96
98 // Callback to run on favicon download completion. 97 // Callback to run on favicon download completion.
99 FaviconDownloaderCallback callback_; 98 FaviconDownloaderCallback callback_;
100 99
101 base::WeakPtrFactory<FaviconDownloader> weak_ptr_factory_; 100 base::WeakPtrFactory<FaviconDownloader> weak_ptr_factory_;
102 101
103 DISALLOW_COPY_AND_ASSIGN(FaviconDownloader); 102 DISALLOW_COPY_AND_ASSIGN(FaviconDownloader);
104 }; 103 };
105 104
106 #endif // CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_ 105 #endif // CHROME_BROWSER_EXTENSIONS_FAVICON_DOWNLOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/favicon_downloader.cc » ('j') | chrome/browser/extensions/favicon_downloader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698