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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 0b201aed55faf8d868c8302292c3b7e6fabd58b9..76f22e2c26bdb571275c09792f98cd0229f708ec 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
@@ -325,7 +324,8 @@ void TabRendererGtk::UpdateData(WebContents* contents,
bool app,
bool loading_only) {
DCHECK(contents);
- TabContents* tab_contents = TabContents::FromWebContents(contents);
+ FaviconTabHelper* favicon_tab_helper =
+ FaviconTabHelper::FromWebContents(contents);
if (!loading_only) {
data_.title = contents->GetTitle();
@@ -337,8 +337,7 @@ void TabRendererGtk::UpdateData(WebContents* contents,
if (app_icon) {
data_.favicon = *app_icon;
} else {
- data_.favicon =
- tab_contents->favicon_tab_helper()->GetFavicon().AsBitmap();
+ data_.favicon = favicon_tab_helper->GetFavicon().AsBitmap();
}
data_.app = app;
@@ -402,7 +401,7 @@ void TabRendererGtk::UpdateData(WebContents* contents,
// Loading state also involves whether we show the favicon, since that's where
// we display the throbber.
data_.loading = contents->IsLoading();
- data_.show_icon = tab_contents->favicon_tab_helper()->ShouldDisplayFavicon();
+ data_.show_icon = favicon_tab_helper->ShouldDisplayFavicon();
}
void TabRendererGtk::UpdateFromModel() {
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698