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