diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-17 13:57:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-19 13:44:40 +0000 |
commit | 6ec7b8da05d21a3878bd21c691b41e675d74bb1c (patch) | |
tree | b87f250bc19413750b9bb9cdbf2da20ef5014820 /chromium/components/favicon/ios | |
parent | ec02ee4181c49b61fce1c8fb99292dbb8139cc90 (diff) | |
download | qtwebengine-chromium-6ec7b8da05d21a3878bd21c691b41e675d74bb1c.tar.gz |
BASELINE: Update Chromium to 60.0.3112.70
Change-Id: I9911c2280a014d4632f254857876a395d4baed2d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/components/favicon/ios')
4 files changed, 22 insertions, 5 deletions
diff --git a/chromium/components/favicon/ios/BUILD.gn b/chromium/components/favicon/ios/BUILD.gn index 37ef0fbb7e8..5014a92e55b 100644 --- a/chromium/components/favicon/ios/BUILD.gn +++ b/chromium/components/favicon/ios/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("ios") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "favicon_url_util.cc", "favicon_url_util.h", diff --git a/chromium/components/favicon/ios/favicon_url_util.cc b/chromium/components/favicon/ios/favicon_url_util.cc index 95bcfda262b..54b072c5065 100644 --- a/chromium/components/favicon/ios/favicon_url_util.cc +++ b/chromium/components/favicon/ios/favicon_url_util.cc @@ -23,6 +23,8 @@ favicon_base::IconType IconTypeFromWebIconType( return favicon_base::TOUCH_ICON; case web::FaviconURL::TOUCH_PRECOMPOSED_ICON: return favicon_base::TOUCH_PRECOMPOSED_ICON; + case web::FaviconURL::WEB_MANIFEST_ICON: + return favicon_base::WEB_MANIFEST_ICON; case web::FaviconURL::INVALID_ICON: return favicon_base::INVALID_ICON; } diff --git a/chromium/components/favicon/ios/web_favicon_driver.h b/chromium/components/favicon/ios/web_favicon_driver.h index 9b9e7d004da..5006975b335 100644 --- a/chromium/components/favicon/ios/web_favicon_driver.h +++ b/chromium/components/favicon/ios/web_favicon_driver.h @@ -24,6 +24,8 @@ class WebFaviconDriver : public web::WebStateObserver, public web::WebStateUserData<WebFaviconDriver>, public FaviconDriverImpl { public: + ~WebFaviconDriver() override; + static void CreateForWebState(web::WebState* web_state, FaviconService* favicon_service, history::HistoryService* history_service, @@ -39,6 +41,8 @@ class WebFaviconDriver : public web::WebStateObserver, int DownloadImage(const GURL& url, int max_image_size, ImageDownloadCallback callback) override; + void DownloadManifest(const GURL& url, + ManifestDownloadCallback callback) override; bool IsOffTheRecord() override; void OnFaviconUpdated( const GURL& page_url, @@ -54,7 +58,6 @@ class WebFaviconDriver : public web::WebStateObserver, FaviconService* favicon_service, history::HistoryService* history_service, bookmarks::BookmarkModel* bookmark_model); - ~WebFaviconDriver() override; // web::WebStateObserver implementation. void FaviconUrlUpdated( diff --git a/chromium/components/favicon/ios/web_favicon_driver.mm b/chromium/components/favicon/ios/web_favicon_driver.mm index 500a5f4c435..0025341b757 100644 --- a/chromium/components/favicon/ios/web_favicon_driver.mm +++ b/chromium/components/favicon/ios/web_favicon_driver.mm @@ -5,6 +5,7 @@ #include "components/favicon/ios/web_favicon_driver.h" #include "base/bind.h" +#include "base/memory/ptr_util.h" #include "base/threading/sequenced_worker_pool.h" #include "components/favicon/core/favicon_url.h" #include "components/favicon/ios/favicon_url_util.h" @@ -18,6 +19,10 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + DEFINE_WEB_STATE_USER_DATA_KEY(favicon::WebFaviconDriver); // Callback for the download of favicon. @@ -39,9 +44,9 @@ void WebFaviconDriver::CreateForWebState( if (FromWebState(web_state)) return; - web_state->SetUserData(UserDataKey(), - new WebFaviconDriver(web_state, favicon_service, - history_service, bookmark_model)); + web_state->SetUserData(UserDataKey(), base::WrapUnique(new WebFaviconDriver( + web_state, favicon_service, + history_service, bookmark_model))); } void WebFaviconDriver::FetchFavicon(const GURL& url) { @@ -97,6 +102,11 @@ int WebFaviconDriver::DownloadImage(const GURL& url, return downloaded_image_count; } +void WebFaviconDriver::DownloadManifest(const GURL& url, + ManifestDownloadCallback callback) { + NOTREACHED(); +} + bool WebFaviconDriver::IsOffTheRecord() { DCHECK(web_state()); return web_state()->GetBrowserState()->IsOffTheRecord(); @@ -136,7 +146,8 @@ WebFaviconDriver::~WebFaviconDriver() { void WebFaviconDriver::FaviconUrlUpdated( const std::vector<web::FaviconURL>& candidates) { DCHECK(!candidates.empty()); - OnUpdateFaviconURL(GetActiveURL(), FaviconURLsFromWebFaviconURLs(candidates)); + OnUpdateCandidates(GetActiveURL(), FaviconURLsFromWebFaviconURLs(candidates), + GURL()); } } // namespace favicon |