Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: chrome/renderer/favicon_helper.cc

Issue 11416179: Move chrome/common/favicon_url.(cc|h) into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/favicon_helper.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/renderer/favicon_helper.h" 5 #include "chrome/renderer/favicon_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/common/chrome_constants.h" 9 #include "chrome/common/chrome_constants.h"
10 #include "chrome/common/favicon_url.h"
11 #include "chrome/common/icon_messages.h" 10 #include "chrome/common/icon_messages.h"
11 #include "content/public/common/favicon_url.h"
12 #include "content/public/renderer/render_view.h" 12 #include "content/public/renderer/render_view.h"
13 #include "net/base/data_url.h" 13 #include "net/base/data_url.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
18 #include "ui/gfx/favicon_size.h" 18 #include "ui/gfx/favicon_size.h"
19 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
20 #include "ui/gfx/skbitmap_operations.h" 20 #include "ui/gfx/skbitmap_operations.h"
21 #include "webkit/glue/image_decoder.h" 21 #include "webkit/glue/image_decoder.h"
22 #include "webkit/glue/multi_resolution_image_resource_fetcher.h" 22 #include "webkit/glue/multi_resolution_image_resource_fetcher.h"
23 #include "webkit/glue/webkit_glue.h" 23 #include "webkit/glue/webkit_glue.h"
24 24
25 using content::FaviconURL;
25 using WebKit::WebFrame; 26 using WebKit::WebFrame;
26 using WebKit::WebIconURL; 27 using WebKit::WebIconURL;
27 using WebKit::WebVector; 28 using WebKit::WebVector;
28 using WebKit::WebURL; 29 using WebKit::WebURL;
29 using WebKit::WebURLRequest; 30 using WebKit::WebURLRequest;
30 using webkit_glue::MultiResolutionImageResourceFetcher; 31 using webkit_glue::MultiResolutionImageResourceFetcher;
31 32
32 static FaviconURL::IconType ToFaviconType(WebIconURL::Type type) { 33 static FaviconURL::IconType ToFaviconType(WebIconURL::Type type) {
33 switch (type) { 34 switch (type) {
34 case WebIconURL::TypeFavicon: 35 case WebIconURL::TypeFavicon:
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return; 164 return;
164 165
165 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); 166 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type);
166 std::vector<FaviconURL> urls; 167 std::vector<FaviconURL> urls;
167 for (size_t i = 0; i < icon_urls.size(); i++) { 168 for (size_t i = 0; i < icon_urls.size(); i++) {
168 urls.push_back(FaviconURL(icon_urls[i].iconURL(), 169 urls.push_back(FaviconURL(icon_urls[i].iconURL(),
169 ToFaviconType(icon_urls[i].iconType()))); 170 ToFaviconType(icon_urls[i].iconType())));
170 } 171 }
171 SendUpdateFaviconURL(routing_id(), render_view()->GetPageId(), urls); 172 SendUpdateFaviconURL(routing_id(), render_view()->GetPageId(), urls);
172 } 173 }
OLDNEW
« no previous file with comments | « chrome/renderer/favicon_helper.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698