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

Unified Diff: chrome/browser/ui/browser.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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index c0bdf7bca500a66c4d1286740e2ecba10778a2ed..fe8ca3a79762e107752712cd0a1b94b4c25f638a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -49,6 +49,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
+#include "chrome/browser/favicon_tab_helper.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/google/google_url_tracker.h"
#include "chrome/browser/google/google_util.h"
@@ -813,10 +814,10 @@ bool Browser::GetSavedMaximizedState() const {
}
SkBitmap Browser::GetCurrentPageIcon() const {
- TabContents* contents = GetSelectedTabContents();
+ TabContentsWrapper* contents = GetSelectedTabContentsWrapper();
// |contents| can be NULL since GetCurrentPageIcon() is called by the window
// during the window's creation (before tabs have been added).
- return contents ? contents->GetFavicon() : SkBitmap();
+ return contents ? contents->favicon_tab_helper()->GetFavicon() : SkBitmap();
}
string16 Browser::GetWindowTitleForCurrentTab() const {
@@ -1588,13 +1589,13 @@ void Browser::BookmarkCurrentPage() {
GURL url;
string16 title;
- TabContents* tab = GetSelectedTabContents();
- bookmark_utils::GetURLAndTitleToBookmark(tab, &url, &title);
+ TabContentsWrapper* tab = GetSelectedTabContentsWrapper();
+ bookmark_utils::GetURLAndTitleToBookmark(tab->tab_contents(), &url, &title);
bool was_bookmarked = model->IsBookmarked(url);
if (!was_bookmarked && profile_->IsOffTheRecord()) {
// If we're incognito the favicon may not have been saved. Save it now
// so that bookmarks have an icon for the page.
- tab->SaveFavicon();
+ tab->favicon_tab_helper()->SaveFavicon();
}
model->SetURLStarred(url, title, true);
// Make sure the model actually added a bookmark before showing the star. A
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/cocoa/hung_renderer_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698