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 "chrome/browser/favicon/favicon_tab_helper.h" | 5 #include "chrome/browser/favicon/favicon_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/favicon/favicon_download_helper.h" | 7 #include "chrome/browser/favicon/favicon_download_helper.h" |
8 #include "chrome/browser/favicon/favicon_handler.h" | 8 #include "chrome/browser/favicon/favicon_handler.h" |
9 #include "chrome/browser/favicon/favicon_service_factory.h" | 9 #include "chrome/browser/favicon/favicon_service_factory.h" |
10 #include "chrome/browser/favicon/favicon_util.h" | 10 #include "chrome/browser/favicon/favicon_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/public/browser/render_view_host.h" | 23 #include "content/public/browser/render_view_host.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "content/public/browser/web_contents_delegate.h" | 25 #include "content/public/browser/web_contents_delegate.h" |
26 #include "content/public/browser/web_ui.h" | 26 #include "content/public/browser/web_ui.h" |
27 #include "ui/gfx/codec/png_codec.h" | 27 #include "ui/gfx/codec/png_codec.h" |
28 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
29 #include "ui/gfx/image/image_skia.h" | 29 #include "ui/gfx/image/image_skia.h" |
30 #include "ui/gfx/image/image_skia_rep.h" | 30 #include "ui/gfx/image/image_skia_rep.h" |
31 | 31 |
32 using content::FaviconStatus; | 32 using content::FaviconStatus; |
| 33 using content::FaviconURL; |
33 using content::NavigationController; | 34 using content::NavigationController; |
34 using content::NavigationEntry; | 35 using content::NavigationEntry; |
35 using content::WebContents; | 36 using content::WebContents; |
36 | 37 |
37 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FaviconTabHelper) | 38 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FaviconTabHelper) |
38 | 39 |
39 FaviconTabHelper::FaviconTabHelper(WebContents* web_contents) | 40 FaviconTabHelper::FaviconTabHelper(WebContents* web_contents) |
40 : content::WebContentsObserver(web_contents), | 41 : content::WebContentsObserver(web_contents), |
41 profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) { | 42 profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) { |
42 favicon_download_helper_.reset(new FaviconDownloadHelper(web_contents, this)); | 43 favicon_download_helper_.reset(new FaviconDownloadHelper(web_contents, this)); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 bool errored, | 171 bool errored, |
171 int requested_size, | 172 int requested_size, |
172 const std::vector<SkBitmap>& bitmaps) { | 173 const std::vector<SkBitmap>& bitmaps) { |
173 favicon_handler_->OnDidDownloadFavicon( | 174 favicon_handler_->OnDidDownloadFavicon( |
174 id, image_url, errored, requested_size, bitmaps); | 175 id, image_url, errored, requested_size, bitmaps); |
175 if (touch_icon_handler_.get()) { | 176 if (touch_icon_handler_.get()) { |
176 touch_icon_handler_->OnDidDownloadFavicon( | 177 touch_icon_handler_->OnDidDownloadFavicon( |
177 id, image_url, errored, requested_size, bitmaps); | 178 id, image_url, errored, requested_size, bitmaps); |
178 } | 179 } |
179 } | 180 } |
OLD | NEW |