| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |