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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 896ebdcb6a564c03d8ea39ce155feafd5efba623..c2b0b0b66295bfa859ecf82086ca85c262b59ffd 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1153,8 +1153,8 @@ void LocationBarView::OnSetFocus() {
}
gfx::Image LocationBarView::GetFavicon() const {
- return delegate_->GetTabContents()->favicon_tab_helper()->
- GetFavicon();
+ return FaviconTabHelper::FromWebContents(
+ delegate_->GetTabContents()->web_contents())->GetFavicon();
}
string16 LocationBarView::GetTitle() const {
@@ -1387,16 +1387,15 @@ void LocationBarView::WriteDragDataForView(views::View* sender,
DCHECK_NE(GetDragOperationsForView(sender, press_pt),
ui::DragDropTypes::DRAG_NONE);
- TabContents* tab_contents = GetTabContents();
- DCHECK(tab_contents);
- gfx::ImageSkia favicon =
- tab_contents->favicon_tab_helper()->GetFavicon().AsImageSkia();
- button_drag_utils::SetURLAndDragImage(
- tab_contents->web_contents()->GetURL(),
- tab_contents->web_contents()->GetTitle(),
- favicon,
- data,
- sender->GetWidget());
+ WebContents* web_contents = GetTabContents()->web_contents();
+ FaviconTabHelper* favicon_tab_helper =
+ FaviconTabHelper::FromWebContents(web_contents);
+ gfx::ImageSkia favicon = favicon_tab_helper->GetFavicon().AsImageSkia();
+ button_drag_utils::SetURLAndDragImage(web_contents->GetURL(),
+ web_contents->GetTitle(),
+ favicon,
+ data,
+ sender->GetWidget());
}
int LocationBarView::GetDragOperationsForView(views::View* sender,
« no previous file with comments | « chrome/browser/ui/views/hung_renderer_view.cc ('k') | chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698