summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa')
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm6
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm12
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm5
4 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index a72eeca..a3c5b90 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -9,7 +9,6 @@
#include "base/mac/bundle_locations.h"
#include "base/process/process.h"
#include "base/strings/sys_string_conversions.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
#import "chrome/browser/ui/cocoa/multi_key_equivalent_button.h"
#import "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 5a6f0f1..6678f33 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h"
#include "base/strings/sys_string_conversions.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -14,6 +13,7 @@
#import "chrome/browser/ui/cocoa/drag_util.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#include "chrome/grit/generated_resources.h"
+#include "components/favicon/content/content_favicon_driver.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
@@ -69,7 +69,9 @@ NSPasteboard* LocationIconDecoration::GetDragPasteboard() {
NSImage* LocationIconDecoration::GetDragImage() {
content::WebContents* web_contents = owner_->GetWebContents();
NSImage* favicon =
- FaviconTabHelper::FromWebContents(web_contents)->GetFavicon().AsNSImage();
+ favicon::ContentFaviconDriver::FromWebContents(web_contents)
+ ->GetFavicon()
+ .AsNSImage();
NSImage* iconImage = favicon ? favicon : GetImage();
NSImage* image =
diff --git a/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm b/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
index b4fe508..d713b62 100644
--- a/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
@@ -4,18 +4,18 @@
#include "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
+#include "components/favicon/content/content_favicon_driver.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/resources/grit/ui_resources.h"
namespace mac {
NSImage* FaviconForWebContents(content::WebContents* contents) {
- FaviconTabHelper* favicon_tab_helper =
- contents ? FaviconTabHelper::FromWebContents(contents)
- : NULL;
- if (favicon_tab_helper && favicon_tab_helper->FaviconIsValid()) {
- NSImage* image = favicon_tab_helper->GetFavicon().AsNSImage();
+ favicon::FaviconDriver* favicon_driver =
+ contents ? favicon::ContentFaviconDriver::FromWebContents(contents)
+ : nullptr;
+ if (favicon_driver && favicon_driver->FaviconIsValid()) {
+ NSImage* image = favicon_driver->GetFavicon().AsNSImage();
// The |image| could be nil if the bitmap is null. In that case, fallback
// to the default image.
if (image) {
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 8dde6a25..b4a33f5 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -20,7 +20,7 @@
#include "chrome/browser/autocomplete/autocomplete_classifier.h"
#include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
#include "chrome/browser/extensions/tab_helper.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
+#include "chrome/browser/favicon/favicon_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/themes/theme_service.h"
@@ -1555,7 +1555,8 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
TabController* tabController = [tabArray_ objectAtIndex:index];
bool oldHasIcon = [tabController iconView] != nil;
- bool newHasIcon = FaviconTabHelper::ShouldDisplayFavicon(contents) ||
+ bool newHasIcon =
+ favicon::ShouldDisplayFavicon(contents) ||
tabStripModel_->IsMiniTab(modelIndex); // Always show icon if mini.
TabLoadingState oldState = [tabController loadingState];