| 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/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 void FaviconTabHelper::NotifyFaviconUpdated(bool icon_url_changed) { | 152 void FaviconTabHelper::NotifyFaviconUpdated(bool icon_url_changed) { |
| 153 content::NotificationService::current()->Notify( | 153 content::NotificationService::current()->Notify( |
| 154 chrome::NOTIFICATION_FAVICON_UPDATED, | 154 chrome::NOTIFICATION_FAVICON_UPDATED, |
| 155 content::Source<WebContents>(web_contents()), | 155 content::Source<WebContents>(web_contents()), |
| 156 content::Details<bool>(&icon_url_changed)); | 156 content::Details<bool>(&icon_url_changed)); |
| 157 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TAB); | 157 web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TAB); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void FaviconTabHelper::NavigateToPendingEntry( | 160 void FaviconTabHelper::DidCreatePendingEntry( |
| 161 const GURL& url, | 161 const GURL& url, |
| 162 NavigationController::ReloadType reload_type) { | 162 NavigationController::ReloadType reload_type) { |
| 163 if (reload_type != NavigationController::NO_RELOAD && | 163 if (reload_type != NavigationController::NO_RELOAD && |
| 164 !profile_->IsOffTheRecord()) { | 164 !profile_->IsOffTheRecord()) { |
| 165 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( | 165 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
| 166 profile_, Profile::IMPLICIT_ACCESS); | 166 profile_, Profile::IMPLICIT_ACCESS); |
| 167 if (favicon_service) { | 167 if (favicon_service) { |
| 168 favicon_service->SetFaviconOutOfDateForPage(url); | 168 favicon_service->SetFaviconOutOfDateForPage(url); |
| 169 if (reload_type == NavigationController::RELOAD_IGNORING_CACHE) | 169 if (reload_type == NavigationController::RELOAD_IGNORING_CACHE) |
| 170 favicon_service->ClearUnableToDownloadFavicons(); | 170 favicon_service->ClearUnableToDownloadFavicons(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 favicon_service->UnableToDownloadFavicon(image_url); | 202 favicon_service->UnableToDownloadFavicon(image_url); |
| 203 } | 203 } |
| 204 | 204 |
| 205 favicon_handler_->OnDidDownloadFavicon( | 205 favicon_handler_->OnDidDownloadFavicon( |
| 206 id, image_url, bitmaps, original_bitmap_sizes); | 206 id, image_url, bitmaps, original_bitmap_sizes); |
| 207 if (touch_icon_handler_.get()) { | 207 if (touch_icon_handler_.get()) { |
| 208 touch_icon_handler_->OnDidDownloadFavicon( | 208 touch_icon_handler_->OnDidDownloadFavicon( |
| 209 id, image_url, bitmaps, original_bitmap_sizes); | 209 id, image_url, bitmaps, original_bitmap_sizes); |
| 210 } | 210 } |
| 211 } | 211 } |
| OLD | NEW |