diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 23:28:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 23:28:19 +0000 |
commit | c9bd2e8e19e8c5891d68e99b4c610c04a62046a0 (patch) | |
tree | 689e7d832227bd431aadd4698807edb246030fc8 /chrome | |
parent | 97e521cba140ce053f33dd3e852e847c76781689 (diff) | |
download | chromium_src-c9bd2e8e19e8c5891d68e99b4c610c04a62046a0.zip chromium_src-c9bd2e8e19e8c5891d68e99b4c610c04a62046a0.tar.gz chromium_src-c9bd2e8e19e8c5891d68e99b4c610c04a62046a0.tar.bz2 |
Remove the TabContentsDelegate::ToolbarSizeChanged() method as no one was using it. Rename BrowserWindow::SelectedTabToolbarSizeChanged() to ToolbarSizeChanged() as there are no per-tab toolbars since we made the DownloadShelf per-window a while ago.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6870002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
39 files changed, 20 insertions, 87 deletions
diff --git a/chrome/browser/blocked_content_container.h b/chrome/browser/blocked_content_container.h index a78e092..4b057cb 100644 --- a/chrome/browser/blocked_content_container.h +++ b/chrome/browser/blocked_content_container.h @@ -81,9 +81,6 @@ class BlockedContentContainer : public TabContentsDelegate { // Returns our |owner_|. virtual TabContents* GetConstrainingContents(TabContents* source); - // Ignored; BlockedContentContainer doesn't display a toolbar. - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} - // Ignored; BlockedContentContainer doesn't display a URL bar. virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc index ba2652d..31f3ab2 100644 --- a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc +++ b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc @@ -69,7 +69,6 @@ class EnrollmentDomView : public WebPageDomView, return false; } virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} virtual bool HandleContextMenu(const ContextMenuParams& params) { return true; } diff --git a/chrome/browser/chromeos/login/eula_view.h b/chrome/browser/chromeos/login/eula_view.h index 4ed2ee0..dca2c84 100644 --- a/chrome/browser/chromeos/login/eula_view.h +++ b/chrome/browser/chromeos/login/eula_view.h @@ -63,7 +63,6 @@ class EULATabContentsDelegate : public TabContentsDelegate { return false; } virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} virtual bool HandleContextMenu(const ContextMenuParams& params) { return true; } diff --git a/chrome/browser/chromeos/login/web_page_screen.h b/chrome/browser/chromeos/login/web_page_screen.h index ec49ad3..5b8f4de 100644 --- a/chrome/browser/chromeos/login/web_page_screen.h +++ b/chrome/browser/chromeos/login/web_page_screen.h @@ -48,7 +48,6 @@ class WebPageScreen : public TabContentsDelegate { return false; } virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} virtual bool HandleContextMenu(const ContextMenuParams& params); // Called by |timeout_timer_|. Stops page fetching and closes screen. diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h index 84bacce..becad62 100644 --- a/chrome/browser/debugger/devtools_window.h +++ b/chrome/browser/debugger/devtools_window.h @@ -90,7 +90,6 @@ class DevToolsWindow virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} virtual bool CanReloadContents(TabContents* source) const; virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index 1bb2917..a6fdfab 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -508,10 +508,6 @@ void ExternalTabContainer::UpdateTargetURL(TabContents* source, void ExternalTabContainer::ContentsZoomChange(bool zoom_in) { } -void ExternalTabContainer::ToolbarSizeChanged(TabContents* source, - bool finished) { -} - void ExternalTabContainer::ForwardMessageToExternalHost( const std::string& message, const std::string& origin, const std::string& target) { diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h index 617b84d..1a2af72 100644 --- a/chrome/browser/external_tab_container_win.h +++ b/chrome/browser/external_tab_container_win.h @@ -130,7 +130,6 @@ class ExternalTabContainer : public TabContentsDelegate, virtual bool IsPopup(const TabContents* source) const; virtual void UpdateTargetURL(TabContents* source, const GURL& url); virtual void ContentsZoomChange(bool zoom_in); - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void ForwardMessageToExternalHost(const std::string& message, const std::string& origin, const std::string& target); diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index 5e8a032..c9ac786 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -192,8 +192,6 @@ class InstantLoader::TabContentsDelegateImpl const gfx::Rect& pos) OVERRIDE; virtual bool ShouldFocusConstrainedWindow() OVERRIDE; virtual void WillShowConstrainedWindow(TabContents* source) OVERRIDE; - virtual void ToolbarSizeChanged(TabContents* source, - bool is_animating) OVERRIDE; virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE; virtual bool ShouldSuppressDialogs() OVERRIDE; @@ -479,11 +477,6 @@ void InstantLoader::TabContentsDelegateImpl::WillShowConstrainedWindow( } } -void InstantLoader::TabContentsDelegateImpl::ToolbarSizeChanged( - TabContents* source, - bool is_animating) { -} - void InstantLoader::TabContentsDelegateImpl::UpdateTargetURL( TabContents* source, const GURL& url) { } diff --git a/chrome/browser/instant/instant_unload_handler.cc b/chrome/browser/instant/instant_unload_handler.cc index ab804b3..fd2a1a0 100644 --- a/chrome/browser/instant/instant_unload_handler.cc +++ b/chrome/browser/instant/instant_unload_handler.cc @@ -68,7 +68,6 @@ class InstantUnloadHandler::TabContentsDelegateImpl virtual void DeactivateContents(TabContents* contents) {} virtual void LoadingStateChanged(TabContents* source) {} virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} private: diff --git a/chrome/browser/sidebar/sidebar_container.h b/chrome/browser/sidebar/sidebar_container.h index 29541a1..0fe1cb3 100644 --- a/chrome/browser/sidebar/sidebar_container.h +++ b/chrome/browser/sidebar/sidebar_container.h @@ -113,7 +113,6 @@ class SidebarContainer virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} virtual bool IsPopup(const TabContents* source) const; virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} // Overridden from ImageLoadingTracker::Observer. virtual void OnImageLoaded(SkBitmap* image, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index b4e9b6f..ffff262 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1046,8 +1046,8 @@ void Browser::BrowserRenderWidgetShowing() { RenderWidgetShowing(); } -void Browser::ToolbarSizeChanged(bool is_animating) { - ToolbarSizeChanged(NULL, is_animating); +void Browser::BookmarkBarSizeChanged(bool is_animating) { + window_->ToolbarSizeChanged(is_animating); } TabContents* Browser::AddRestoredTab( @@ -3010,13 +3010,6 @@ bool Browser::IsPopup(const TabContents* source) const { return !!(type() & TYPE_POPUP); } -void Browser::ToolbarSizeChanged(TabContents* source, bool is_animating) { - if (source == GetSelectedTabContents() || source == NULL) { - // This will refresh the shelf if needed. - window_->SelectedTabToolbarSizeChanged(is_animating); - } -} - void Browser::ContentsMouseEvent( TabContents* source, const gfx::Point& location, bool motion) { if (!GetStatusBubble()) diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index c8780f9..dd45710 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -415,9 +415,9 @@ class Browser : public TabHandlerDelegate, // Called when a popup select is about to be displayed. void BrowserRenderWidgetShowing(); - // Notification that some of our content has changed size as - // part of an animation. - void ToolbarSizeChanged(bool is_animating); + // Notification that the bookmark bar has changed size. We need to resize the + // content area and notify our InfoBarContainer. + void BookmarkBarSizeChanged(bool is_animating); // Replaces the state of the currently selected tab with the session // history restored from the SessionRestore system. @@ -776,7 +776,6 @@ class Browser : public TabHandlerDelegate, virtual void DetachContents(TabContents* source); virtual bool IsPopup(const TabContents* source) const; virtual bool CanReloadContents(TabContents* source) const; - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void UpdateTargetURL(TabContents* source, const GURL& url); virtual void ContentsMouseEvent( TabContents* source, const gfx::Point& location, bool motion); diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index 5fa6ddf..2802afb 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h @@ -96,7 +96,7 @@ class BrowserWindow { // selected tab. // TODO(beng): Remove. Infobars/Boomarks bars should talk directly to // BrowserView. - virtual void SelectedTabToolbarSizeChanged(bool is_animating) = 0; + virtual void ToolbarSizeChanged(bool is_animating) = 0; // Inform the frame that the selected tab favicon or title has changed. Some // frames may need to refresh their title bar. diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h index 3745556..11d09fd 100644 --- a/chrome/browser/ui/cocoa/browser_window_cocoa.h +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h @@ -43,7 +43,7 @@ class BrowserWindowCocoa : public BrowserWindow, virtual gfx::NativeWindow GetNativeHandle(); virtual BrowserWindowTesting* GetBrowserWindowTesting(); virtual StatusBubble* GetStatusBubble(); - virtual void SelectedTabToolbarSizeChanged(bool is_animating); + virtual void ToolbarSizeChanged(bool is_animating); virtual void UpdateTitleBar(); virtual void ShelfVisibilityChanged(); virtual void UpdateDevTools(); diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm index 43fdb57..eb02ac8 100644 --- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm @@ -139,7 +139,7 @@ StatusBubble* BrowserWindowCocoa::GetStatusBubble() { return [controller_ statusBubble]; } -void BrowserWindowCocoa::SelectedTabToolbarSizeChanged(bool is_animating) { +void BrowserWindowCocoa::ToolbarSizeChanged(bool is_animating) { // According to beng, this is an ugly method that comes from the days when the // download shelf was a ChromeView attached to the TabContents, and as its // size changed via animation it notified through TCD/etc to the browser view diff --git a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm index 74778a0..d3cabc5 100644 --- a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm +++ b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm @@ -40,7 +40,6 @@ class ConstrainedHtmlDelegateMac : // HtmlDialogTabContentsDelegate --------------------------------------------- void MoveContents(TabContents* source, const gfx::Rect& pos) {} - void ToolbarSizeChanged(TabContents* source, bool is_animating) {} void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} void set_window(ConstrainedWindow* window) { diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm index 3b2d026..67c9537 100644 --- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm +++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm @@ -48,7 +48,6 @@ public: // HtmlDialogTabContentsDelegate declarations. virtual void MoveContents(TabContents* source, const gfx::Rect& pos); - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); private: @@ -171,11 +170,6 @@ void HtmlDialogWindowDelegateBridge::MoveContents(TabContents* source, // TODO(akalin): Actually set the window bounds. } -void HtmlDialogWindowDelegateBridge::ToolbarSizeChanged( - TabContents* source, bool is_animating) { - // TODO(akalin): Figure out what to do here. -} - // A simplified version of BrowserWindowCocoa::HandleKeyboardEvent(). // We don't handle global keyboard shortcuts here, but that's fine since // they're all browser-specific. (This may change in the future.) diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 8ea0fdb..21010f0 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -705,7 +705,7 @@ StatusBubble* BrowserWindowGtk::GetStatusBubble() { return status_bubble_.get(); } -void BrowserWindowGtk::SelectedTabToolbarSizeChanged(bool is_animating) { +void BrowserWindowGtk::ToolbarSizeChanged(bool is_animating) { // On Windows, this is used for a performance optimization. // http://code.google.com/p/chromium/issues/detail?id=12291 } diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h index 9093274..35076dc 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.h +++ b/chrome/browser/ui/gtk/browser_window_gtk.h @@ -65,7 +65,7 @@ class BrowserWindowGtk : public BrowserWindow, virtual gfx::NativeWindow GetNativeHandle(); virtual BrowserWindowTesting* GetBrowserWindowTesting(); virtual StatusBubble* GetStatusBubble(); - virtual void SelectedTabToolbarSizeChanged(bool is_animating); + virtual void ToolbarSizeChanged(bool is_animating); virtual void UpdateTitleBar(); virtual void ShelfVisibilityChanged(); virtual void UpdateDevTools(); diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc index 6bae176..612cba1 100644 --- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc +++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc @@ -46,7 +46,6 @@ class ConstrainedHtmlDelegateGtk : public ConstrainedWindowGtkDelegate, // HtmlDialogTabContentsDelegate --------------------------------------------- void MoveContents(TabContents* source, const gfx::Rect& pos) {} - void ToolbarSizeChanged(TabContents* source, bool is_animating) {} void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} void set_window(ConstrainedWindow* window) { diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.cc b/chrome/browser/ui/gtk/html_dialog_gtk.cc index d457ef6..8cfe1e0 100644 --- a/chrome/browser/ui/gtk/html_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/html_dialog_gtk.cc @@ -108,11 +108,6 @@ void HtmlDialogGtk::MoveContents(TabContents* source, const gfx::Rect& pos) { // if it's a dialog we know about, we trust it not to be mean to the user. } -void HtmlDialogGtk::ToolbarSizeChanged(TabContents* source, - bool is_animating) { - // Ignored. -} - // A simplified version of BrowserWindowGtk::HandleKeyboardEvent(). // We don't handle global keyboard shortcuts here, but that's fine since // they're all browser-specific. (This may change in the future.) diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.h b/chrome/browser/ui/gtk/html_dialog_gtk.h index 1f406d3..9cbfb09 100644 --- a/chrome/browser/ui/gtk/html_dialog_gtk.h +++ b/chrome/browser/ui/gtk/html_dialog_gtk.h @@ -48,7 +48,6 @@ class HtmlDialogGtk : public HtmlDialogTabContentsDelegate, // Overridden from TabContentsDelegate: virtual void MoveContents(TabContents* source, const gfx::Rect& pos); - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); private: diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc index 640e9d6..e3e40cf 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc @@ -175,11 +175,6 @@ bool DraggedTabControllerGtk::IsPopup(const TabContents* source) const { return false; } -void DraggedTabControllerGtk::ToolbarSizeChanged(TabContents* source, - bool finished) { - // Dragged tabs don't care about this. -} - void DraggedTabControllerGtk::UpdateTargetURL(TabContents* source, const GURL& url) { // Ignored. diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h index 6e91c37..f12e0df 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h +++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h @@ -88,7 +88,6 @@ class DraggedTabControllerGtk : public NotificationObserver, virtual void CloseContents(TabContents* source); virtual void MoveContents(TabContents* source, const gfx::Rect& pos); virtual bool IsPopup(const TabContents* source) const; - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void UpdateTargetURL(TabContents* source, const GURL& url); // Overridden from NotificationObserver: diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index ba91026..bc46c71 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -81,7 +81,7 @@ StatusBubble* Panel::GetStatusBubble() { return NULL; } -void Panel::SelectedTabToolbarSizeChanged(bool is_animating){ +void Panel::ToolbarSizeChanged(bool is_animating){ NOTIMPLEMENTED(); } diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h index aabd41c..eb3382a 100644 --- a/chrome/browser/ui/panels/panel.h +++ b/chrome/browser/ui/panels/panel.h @@ -50,7 +50,7 @@ class Panel : public BrowserWindow { virtual gfx::NativeWindow GetNativeHandle(); virtual BrowserWindowTesting* GetBrowserWindowTesting(); virtual StatusBubble* GetStatusBubble(); - virtual void SelectedTabToolbarSizeChanged(bool is_animating); + virtual void ToolbarSizeChanged(bool is_animating); virtual void UpdateTitleBar(); virtual void ShelfVisibilityChanged(); virtual void UpdateDevTools(); diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 2c0d992..657a169 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -750,12 +750,12 @@ bool BookmarkBarView::is_animating() { void BookmarkBarView::AnimationProgressed(const ui::Animation* animation) { if (browser_) - browser_->ToolbarSizeChanged(true); + browser_->BookmarkBarSizeChanged(true); } void BookmarkBarView::AnimationEnded(const ui::Animation* animation) { if (browser_) - browser_->ToolbarSizeChanged(false); + browser_->BookmarkBarSizeChanged(false); SchedulePaint(); } diff --git a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc index 36ee013..ea48190 100644 --- a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc +++ b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc @@ -50,7 +50,6 @@ class ConstrainedHtmlDelegateGtk : public views::WidgetGtk, // HtmlDialogTabContentsDelegate interface. void MoveContents(TabContents* source, const gfx::Rect& pos) {} - void ToolbarSizeChanged(TabContents* source, bool is_animating) {} void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} void set_window(ConstrainedWindow* window) { diff --git a/chrome/browser/ui/views/constrained_html_delegate_win.cc b/chrome/browser/ui/views/constrained_html_delegate_win.cc index 262c67a..95781d2 100644 --- a/chrome/browser/ui/views/constrained_html_delegate_win.cc +++ b/chrome/browser/ui/views/constrained_html_delegate_win.cc @@ -38,7 +38,6 @@ class ConstrainedHtmlDelegateWin : public TabContentsContainer, // HtmlDialogTabContentsDelegate interface. void MoveContents(TabContents* source, const gfx::Rect& pos) {} - void ToolbarSizeChanged(TabContents* source, bool is_animating) {} void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} // Overridden from TabContentsContainer. diff --git a/chrome/browser/ui/views/download_shelf_view.cc b/chrome/browser/ui/views/download_shelf_view.cc index 3d79071..c88c0f4 100644 --- a/chrome/browser/ui/views/download_shelf_view.cc +++ b/chrome/browser/ui/views/download_shelf_view.cc @@ -235,7 +235,7 @@ void DownloadShelfView::AnimationProgressed(const ui::Animation *animation) { // otherwise leave blank white areas where the shelf was and where the // user's eye is. Thankfully bottom-resizing is a lot faster than // top-resizing. - parent_->SelectedTabToolbarSizeChanged(shelf_animation_->IsShowing()); + parent_->ToolbarSizeChanged(shelf_animation_->IsShowing()); } } diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index d5565ec..31cf854 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -614,7 +614,7 @@ StatusBubble* BrowserView::GetStatusBubble() { return status_bubble_.get(); } -void BrowserView::SelectedTabToolbarSizeChanged(bool is_animating) { +void BrowserView::ToolbarSizeChanged(bool is_animating) { if (is_animating) { contents_container_->SetFastResize(true); UpdateUIForContents(browser_->GetSelectedTabContentsWrapper()); @@ -938,7 +938,7 @@ void BrowserView::SetDownloadShelfVisible(bool visible) { // SetDownloadShelfVisible 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. - SelectedTabToolbarSizeChanged(false); + ToolbarSizeChanged(false); } bool BrowserView::IsDownloadShelfVisible() const { @@ -1654,7 +1654,7 @@ void BrowserView::GetAccessibleState(ui::AccessibleViewState* state) { } void BrowserView::InfoBarContainerHeightChanged(bool is_animating) { - SelectedTabToolbarSizeChanged(is_animating); + ToolbarSizeChanged(is_animating); } bool BrowserView::DrawInfoBarArrows(int* x) const { diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index c12c69e..0232918 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -232,7 +232,7 @@ class BrowserView : public BrowserBubbleHost, virtual gfx::NativeWindow GetNativeHandle() OVERRIDE; virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; virtual StatusBubble* GetStatusBubble() OVERRIDE; - virtual void SelectedTabToolbarSizeChanged(bool is_animating) OVERRIDE; + virtual void ToolbarSizeChanged(bool is_animating) OVERRIDE; virtual void UpdateTitleBar() OVERRIDE; virtual void ShelfVisibilityChanged() OVERRIDE; virtual void UpdateDevTools() OVERRIDE; diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc index 3887b6d..229f606 100644 --- a/chrome/browser/ui/views/html_dialog_view.cc +++ b/chrome/browser/ui/views/html_dialog_view.cc @@ -175,11 +175,6 @@ void HtmlDialogView::MoveContents(TabContents* source, const gfx::Rect& pos) { GetWidget()->SetBounds(pos); } -void HtmlDialogView::ToolbarSizeChanged(TabContents* source, - bool is_animating) { - Layout(); -} - // A simplified version of BrowserView::HandleKeyboardEvent(). // We don't handle global keyboard shortcuts here, but that's fine since // they're all browser-specific. (This may change in the future.) diff --git a/chrome/browser/ui/views/html_dialog_view.h b/chrome/browser/ui/views/html_dialog_view.h index 2cdefd1..af91ecf 100644 --- a/chrome/browser/ui/views/html_dialog_view.h +++ b/chrome/browser/ui/views/html_dialog_view.h @@ -72,7 +72,6 @@ class HtmlDialogView // Overridden from TabContentsDelegate: virtual void MoveContents(TabContents* source, const gfx::Rect& pos); - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); virtual void CloseContents(TabContents* source); diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc index 586acc5fb..fb8e74a 100644 --- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc @@ -488,11 +488,6 @@ void DraggedTabController::MoveContents(TabContents* source, // own window. Should be ignored since we're moving the window... } -void DraggedTabController::ToolbarSizeChanged(TabContents* source, - bool finished) { - // Dragged tabs don't care about this. -} - void DraggedTabController::UpdateTargetURL(TabContents* source, const GURL& url) { // Ignored. diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.h b/chrome/browser/ui/views/tabs/dragged_tab_controller.h index 38c7658..5483d6a 100644 --- a/chrome/browser/ui/views/tabs/dragged_tab_controller.h +++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.h @@ -146,8 +146,6 @@ class DraggedTabController : public TabContentsDelegate, virtual void CloseContents(TabContents* source) OVERRIDE; virtual void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE; - virtual void ToolbarSizeChanged(TabContents* source, - bool is_animating) OVERRIDE; virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE; virtual bool ShouldSuppressDialogs() OVERRIDE; diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h index 418a8f8..934997a 100644 --- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h +++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h @@ -34,7 +34,6 @@ class HtmlDialogTabContentsDelegate : public TabContentsDelegate { // TabContentsDelegate declarations. Subclasses of this still need to // override: // virtual void MoveContents(TabContents* source, const gfx::Rect& pos); - // virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); virtual void OpenURLFromTab(TabContents* source, const GURL& url, const GURL& referrer, diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc index 6601ecb..be126ec 100644 --- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc +++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc @@ -32,7 +32,6 @@ class TestTabContentsDelegate : public HtmlDialogTabContentsDelegate { } virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} private: DISALLOW_COPY_AND_ASSIGN(TestTabContentsDelegate); @@ -69,7 +68,6 @@ TEST_F(HtmlDialogTabContentsDelegateTest, DoNothingMethodsTest) { test_tab_contents_delegate_->CloseContents(NULL); test_tab_contents_delegate_->UpdateTargetURL(NULL, GURL()); test_tab_contents_delegate_->MoveContents(NULL, gfx::Rect()); - test_tab_contents_delegate_->ToolbarSizeChanged(NULL, false); EXPECT_EQ(0, browser()->tab_count()); EXPECT_EQ(1U, BrowserList::size()); } diff --git a/chrome/test/test_browser_window.h b/chrome/test/test_browser_window.h index 2a6438f..da15526 100644 --- a/chrome/test/test_browser_window.h +++ b/chrome/test/test_browser_window.h @@ -29,7 +29,7 @@ class TestBrowserWindow : public BrowserWindow { virtual gfx::NativeWindow GetNativeHandle(); virtual BrowserWindowTesting* GetBrowserWindowTesting(); virtual StatusBubble* GetStatusBubble(); - virtual void SelectedTabToolbarSizeChanged(bool is_animating) {} + virtual void ToolbarSizeChanged(bool is_animating) {} virtual void UpdateTitleBar() {} virtual void ShelfVisibilityChanged() {} virtual void UpdateDevTools() {} |