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