summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager/guest_information.cc
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-04-10 08:25:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-10 15:25:40 +0000
commit45582697f9846db420f07615886651e9688e70d3 (patch)
treee513186de8fcad58e36cb0f33dc462ec210a3ac3 /chrome/browser/task_manager/guest_information.cc
parent375ce9a7839b5610d09e6e18f9d0358bf3571a83 (diff)
downloadchromium_src-45582697f9846db420f07615886651e9688e70d3.zip
chromium_src-45582697f9846db420f07615886651e9688e70d3.tar.gz
chromium_src-45582697f9846db420f07615886651e9688e70d3.tar.bz2
Remove FaviconTabHelper
Convert CreateForWebContents() and ShouldDisplayFavicon() from static method into free functions and move them into the favicon namespace. Port client code to use favicon::ContentFaviconDriver::FromWebContents() to access the favicon::FaviconDriver and prefer to use the public base class instead of favicon::ContentFaviconDriver. Rename FaviconTabHelperTest to ContentFaviconDriverTest. BUG=359569 TBR=jochen Review URL: https://codereview.chromium.org/1075443003 Cr-Commit-Position: refs/heads/master@{#324639}
Diffstat (limited to 'chrome/browser/task_manager/guest_information.cc')
-rw-r--r--chrome/browser/task_manager/guest_information.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/task_manager/guest_information.cc b/chrome/browser/task_manager/guest_information.cc
index 0c7f7e1..fdfa035 100644
--- a/chrome/browser/task_manager/guest_information.cc
+++ b/chrome/browser/task_manager/guest_information.cc
@@ -6,13 +6,13 @@
#include "base/strings/string16.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/task_manager/renderer_resource.h"
#include "chrome/browser/task_manager/resource_provider.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/task_manager/task_manager_util.h"
#include "chrome/grit/generated_resources.h"
+#include "components/favicon/content/content_favicon_driver.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -77,9 +77,11 @@ base::string16 GuestResource::GetTitle() const {
gfx::ImageSkia GuestResource::GetIcon() const {
WebContents* web_contents = GetWebContents();
- if (web_contents && FaviconTabHelper::FromWebContents(web_contents)) {
- return FaviconTabHelper::FromWebContents(web_contents)->
- GetFavicon().AsImageSkia();
+ if (web_contents) {
+ favicon::FaviconDriver* favicon_driver =
+ favicon::ContentFaviconDriver::FromWebContents(web_contents);
+ if (favicon_driver)
+ return favicon_driver->GetFavicon().AsImageSkia();
}
return gfx::ImageSkia();
}