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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6735042: Move favicon from TabContents to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 9 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 8ab84c20c727924059892ec1dd9ca674e3f1234f..449778de45f2bb063ef9d82bd916aef34a589660 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_browser_event_router.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/favicon_tab_helper.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
@@ -832,7 +833,7 @@ void LocationBarView::OnSetFocus() {
}
SkBitmap LocationBarView::GetFavicon() const {
- return GetTabContentsFromDelegate(delegate_)->GetFavicon();
+ return delegate_->GetTabContentsWrapper()->favicon_tab_helper()->GetFavicon();
}
string16 LocationBarView::GetTitle() const {
@@ -843,7 +844,7 @@ InstantController* LocationBarView::GetInstant() {
return delegate_->GetInstant();
}
-TabContentsWrapper* LocationBarView::GetTabContentsWrapper() {
+TabContentsWrapper* LocationBarView::GetTabContentsWrapper() const {
return delegate_->GetTabContentsWrapper();
}
@@ -1034,11 +1035,13 @@ void LocationBarView::WriteDragDataForView(views::View* sender,
DCHECK_NE(GetDragOperationsForView(sender, press_pt),
ui::DragDropTypes::DRAG_NONE);
- TabContents* tab_contents = GetTabContentsFromDelegate(delegate_);
+ TabContentsWrapper* tab_contents = delegate_->GetTabContentsWrapper();
DCHECK(tab_contents);
- drag_utils::SetURLAndDragImage(tab_contents->GetURL(),
- UTF16ToWideHack(tab_contents->GetTitle()),
- tab_contents->GetFavicon(), data);
+ drag_utils::SetURLAndDragImage(
+ tab_contents->tab_contents()->GetURL(),
+ UTF16ToWideHack(tab_contents->tab_contents()->GetTitle()),
+ tab_contents->favicon_tab_helper()->GetFavicon(),
+ data);
}
int LocationBarView::GetDragOperationsForView(views::View* sender,
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('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