diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents.cc | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents_delegate.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/download_shelf_view.cc | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index be59357..5e4af3c 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -919,7 +919,7 @@ bool Browser::IsApplication() const { return type_ == BrowserType::APPLICATION; } -void Browser::CrashedStateChanged(TabContents* source) { +void Browser::ContentsStateChanged(TabContents* source) { int index = tabstrip_model_.GetIndexOfTabContents(source); if (index != TabStripModel::kNoTab) tabstrip_model_.UpdateTabContentsStateAt(index); diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index fc84974..807ed07 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -325,7 +325,7 @@ class Browser : public TabStripModelDelegate, virtual void ContentsZoomChange(bool zoom_in); virtual bool IsApplication() const; virtual void ConvertContentsToApplication(TabContents* source); - virtual void CrashedStateChanged(TabContents* source); + virtual void ContentsStateChanged(TabContents* source); virtual bool ShouldDisplayURLField(); // Return this browser type. diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc index 4706809..364ef91 100644 --- a/chrome/browser/tab_contents.cc +++ b/chrome/browser/tab_contents.cc @@ -529,6 +529,9 @@ void TabContents::SetDownloadShelfVisible(bool visible) { } shelf_visible_ = visible; + if (delegate_) + delegate_->ContentsStateChanged(this); + // SetShelfVisible can force-close the shelf, so make sure we lay out // everything correctly, as if the animation had finished. This doesn't // matter for showing the shelf, as the show animation will do it. @@ -550,7 +553,7 @@ void TabContents::SetIsCrashed(bool state) { is_crashed_ = state; if (delegate_) - delegate_->CrashedStateChanged(this); + delegate_->ContentsStateChanged(this); } bool TabContents::IsCrashed() const { diff --git a/chrome/browser/tab_contents_delegate.h b/chrome/browser/tab_contents_delegate.h index d658b71..fc2a8c2 100644 --- a/chrome/browser/tab_contents_delegate.h +++ b/chrome/browser/tab_contents_delegate.h @@ -160,9 +160,9 @@ class TabContentsDelegate : public PageNavigator { virtual void DidNavigate(NavigationType nav_type, int relative_navigation_offset) { return; } - // Informs the TabContentsDelegate that the |IsCrashed| state has changed for - // this tab. - virtual void CrashedStateChanged(TabContents* source) {} + // Informs the TabContentsDelegate that some of our state has changed + // for this tab. + virtual void ContentsStateChanged(TabContents* source) {} // Return whether this tab contents should have a URL bar. Only web contents // opened with a minimal chrome and their popups can be displayed without a diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc index 49f7f67..e18f3b0 100644 --- a/chrome/browser/views/download_shelf_view.cc +++ b/chrome/browser/views/download_shelf_view.cc @@ -223,9 +223,7 @@ void DownloadShelfView::AnimationProgressed(const Animation *animation) { void DownloadShelfView::AnimationEnded(const Animation *animation) { if (animation == shelf_animation_.get()) { - if (shelf_animation_->IsShowing() == false) - tab_contents_->SetDownloadShelfVisible(false); - tab_contents_->ToolbarSizeChanged(false); + tab_contents_->SetDownloadShelfVisible(shelf_animation_->IsShowing()); } } |