From e724cb43e666972363380de0f6eba349160ac28c Mon Sep 17 00:00:00 2001 From: "beng@google.com" Date: Sat, 9 Aug 2008 01:18:15 +0000 Subject: Allow the window icon to be shown in the task bar, Alt+Tab etc. B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@614 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/frame/browser_view2.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'chrome/browser/views') diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc index 7163686..076faa0 100644 --- a/chrome/browser/views/frame/browser_view2.cc +++ b/chrome/browser/views/frame/browser_view2.cc @@ -217,6 +217,7 @@ void BrowserView2::SelectedTabToolbarSizeChanged(bool is_animating) { void BrowserView2::UpdateTitleBar() { frame_->GetWindow()->UpdateWindowTitle(); + frame_->GetWindow()->UpdateWindowIcon(); } void BrowserView2::SetWindowTitle(const std::wstring& title) { @@ -419,10 +420,8 @@ void BrowserView2::TabSelectedAt(TabContents* old_contents, if (BrowserList::GetLastActive() == browser_) new_contents->RestoreFocus(); - /* - UpdateWindowTitle(); - UpdateToolbar(true); - */ + UpdateTitleBar(); + // UpdateToolbar(true); UpdateUIForContents(new_contents); } @@ -467,10 +466,13 @@ bool BrowserView2::ShouldShowWindowTitle() const { } SkBitmap BrowserView2::GetWindowIcon() { - SkBitmap favicon = browser_->GetCurrentPageIcon(); - if (favicon.isNull()) - return default_favicon_; - return favicon; + if (browser_->GetType() == BrowserType::APPLICATION) { + SkBitmap favicon = browser_->GetCurrentPageIcon(); + if (favicon.isNull()) + return default_favicon_; + return favicon; + } + return SkBitmap(); } bool BrowserView2::ShouldShowWindowIcon() const { -- cgit v1.1