Merge two TabContents::InvalidateTypes types and properly update tab download icon.
INVALIDATE_FAVICON and INVALIDATE_TITLE become INVALIDATE_TAB. Also removed some dead code.
TEST=starting a download in a tab should show the download icon. Closing the dshelf should make the icon disappear.
Review URL: http://codereview.chromium.org/109050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15387 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index d673f43..83c49c6 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -580,8 +580,7 @@
return;
is_crashed_ = state;
- if (delegate_)
- delegate_->ContentsStateChanged(this);
+ NotifyNavigationStateChanged(INVALIDATE_TAB);
}
void TabContents::NotifyNavigationStateChanged(unsigned changed_flags) {
@@ -932,8 +931,7 @@
}
shelf_visible_ = visible;
- if (delegate_)
- delegate_->ContentsStateChanged(this);
+ NotifyNavigationStateChanged(INVALIDATE_TAB);
}
// SetShelfVisible can force-close the shelf, so make sure we lay out
@@ -1724,7 +1722,7 @@
// Broadcast notifications when the UI should be updated.
if (entry == controller_.GetEntryAtOffset(0))
- NotifyNavigationStateChanged(INVALIDATE_TITLE);
+ NotifyNavigationStateChanged(INVALIDATE_TAB);
}
void TabContents::UpdateEncoding(RenderViewHost* render_view_host,
@@ -2257,7 +2255,7 @@
if (load_state_ == net::LOAD_STATE_READING_RESPONSE)
SetNotWaitingForResponse();
if (is_loading())
- NotifyNavigationStateChanged(INVALIDATE_LOAD | INVALIDATE_FAVICON);
+ NotifyNavigationStateChanged(INVALIDATE_LOAD | INVALIDATE_TAB);
}
void TabContents::OnDidGetApplicationInfo(