OLD | NEW |
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 #include "components/favicon/ios/web_favicon_driver.h" | 5 #include "components/favicon/ios/web_favicon_driver.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
10 #include "components/favicon/core/favicon_url.h" | 10 #include "components/favicon/core/favicon_url.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 } | 96 } |
97 callback.Run(local_download_id, metadata.http_response_code, local_url, | 97 callback.Run(local_download_id, metadata.http_response_code, local_url, |
98 frames, sizes); | 98 frames, sizes); |
99 }; | 99 }; |
100 image_fetcher_.FetchImageDataWebpDecoded(url, local_callback); | 100 image_fetcher_.FetchImageDataWebpDecoded(url, local_callback); |
101 | 101 |
102 return downloaded_image_count; | 102 return downloaded_image_count; |
103 } | 103 } |
104 | 104 |
| 105 void WebFaviconDriver::DownloadManifest(const GURL& url, |
| 106 ManifestDownloadCallback callback) { |
| 107 NOTREACHED(); |
| 108 } |
| 109 |
105 bool WebFaviconDriver::IsOffTheRecord() { | 110 bool WebFaviconDriver::IsOffTheRecord() { |
106 DCHECK(web_state()); | 111 DCHECK(web_state()); |
107 return web_state()->GetBrowserState()->IsOffTheRecord(); | 112 return web_state()->GetBrowserState()->IsOffTheRecord(); |
108 } | 113 } |
109 | 114 |
110 void WebFaviconDriver::OnFaviconUpdated( | 115 void WebFaviconDriver::OnFaviconUpdated( |
111 const GURL& page_url, | 116 const GURL& page_url, |
112 FaviconDriverObserver::NotificationIconType notification_icon_type, | 117 FaviconDriverObserver::NotificationIconType notification_icon_type, |
113 const GURL& icon_url, | 118 const GURL& icon_url, |
114 bool icon_url_changed, | 119 bool icon_url_changed, |
(...skipping 19 matching lines...) Expand all Loading... |
134 FaviconDriverImpl(favicon_service, history_service, bookmark_model), | 139 FaviconDriverImpl(favicon_service, history_service, bookmark_model), |
135 image_fetcher_(web_state->GetBrowserState()->GetRequestContext(), | 140 image_fetcher_(web_state->GetBrowserState()->GetRequestContext(), |
136 web::WebThread::GetBlockingPool()) {} | 141 web::WebThread::GetBlockingPool()) {} |
137 | 142 |
138 WebFaviconDriver::~WebFaviconDriver() { | 143 WebFaviconDriver::~WebFaviconDriver() { |
139 } | 144 } |
140 | 145 |
141 void WebFaviconDriver::FaviconUrlUpdated( | 146 void WebFaviconDriver::FaviconUrlUpdated( |
142 const std::vector<web::FaviconURL>& candidates) { | 147 const std::vector<web::FaviconURL>& candidates) { |
143 DCHECK(!candidates.empty()); | 148 DCHECK(!candidates.empty()); |
144 OnUpdateCandidates(GetActiveURL(), FaviconURLsFromWebFaviconURLs(candidates)); | 149 OnUpdateCandidates(GetActiveURL(), FaviconURLsFromWebFaviconURLs(candidates), |
| 150 GURL()); |
145 } | 151 } |
146 | 152 |
147 } // namespace favicon | 153 } // namespace favicon |
OLD | NEW |