OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4167 void RenderViewImpl::SendUpdateFaviconURL(const std::vector<FaviconURL>& urls) { | 4167 void RenderViewImpl::SendUpdateFaviconURL(const std::vector<FaviconURL>& urls) { |
4168 if (!urls.empty()) | 4168 if (!urls.empty()) |
4169 Send(new ViewHostMsg_UpdateFaviconURL(routing_id_, urls)); | 4169 Send(new ViewHostMsg_UpdateFaviconURL(routing_id_, urls)); |
4170 } | 4170 } |
4171 | 4171 |
4172 void RenderViewImpl::DidStopLoadingIcons() { | 4172 void RenderViewImpl::DidStopLoadingIcons() { |
4173 int icon_types = WebIconURL::TypeFavicon; | 4173 int icon_types = WebIconURL::TypeFavicon; |
4174 if (TouchEnabled()) | 4174 if (TouchEnabled()) |
4175 icon_types |= WebIconURL::TypeTouchPrecomposed | WebIconURL::TypeTouch; | 4175 icon_types |= WebIconURL::TypeTouchPrecomposed | WebIconURL::TypeTouch; |
4176 | 4176 |
4177 if (webview()->mainFrame()->isWebRemoteFrame()) | |
Charlie Reis
2014/10/08 19:18:38
This is probably the right thing long-term, right?
nasko
2014/10/13 16:55:50
Done.
| |
4178 return; | |
4179 | |
4177 WebVector<WebIconURL> icon_urls = | 4180 WebVector<WebIconURL> icon_urls = |
4178 webview()->mainFrame()->iconURLs(icon_types); | 4181 webview()->mainFrame()->iconURLs(icon_types); |
4179 | 4182 |
4180 std::vector<FaviconURL> urls; | 4183 std::vector<FaviconURL> urls; |
4181 for (size_t i = 0; i < icon_urls.size(); i++) { | 4184 for (size_t i = 0; i < icon_urls.size(); i++) { |
4182 WebURL url = icon_urls[i].iconURL(); | 4185 WebURL url = icon_urls[i].iconURL(); |
4183 std::vector<gfx::Size> sizes; | 4186 std::vector<gfx::Size> sizes; |
4184 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4187 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4185 if (!url.isEmpty()) | 4188 if (!url.isEmpty()) |
4186 urls.push_back( | 4189 urls.push_back( |
4187 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4190 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4188 } | 4191 } |
4189 SendUpdateFaviconURL(urls); | 4192 SendUpdateFaviconURL(urls); |
4190 } | 4193 } |
4191 | 4194 |
4192 } // namespace content | 4195 } // namespace content |
OLD | NEW |