diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-11 14:47:24 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-11 14:47:24 +0000 |
commit | e89cfcb9090e8c98129ae9160c513f504db74599 (patch) | |
tree | d61a18eeb9175953b97284008a9ea095a8da180a /chrome/browser/ui | |
parent | 0c71b754680eb40b42ca1ce7a4e6fef7442b5da4 (diff) | |
download | chromium_src-e89cfcb9090e8c98129ae9160c513f504db74599.zip chromium_src-e89cfcb9090e8c98129ae9160c513f504db74599.tar.gz chromium_src-e89cfcb9090e8c98129ae9160c513f504db74599.tar.bz2 |
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
25 files changed, 72 insertions, 60 deletions
diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc index e0a4aa8..745b877 100644 --- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc +++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc @@ -186,10 +186,11 @@ void BrowserLauncherItemController::TabInsertedAt( UpdateAppState(contents); } -void BrowserLauncherItemController::TabDetachedAt(TabContents* contents, - int index) { +void BrowserLauncherItemController::TabDetachedAt( + content::WebContents* contents, + int index) { launcher_controller()->UpdateAppState( - contents->web_contents(), ChromeLauncherController::APP_STATE_REMOVED); + contents, ChromeLauncherController::APP_STATE_REMOVED); } void BrowserLauncherItemController::TabChangedAt( diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h index 8a800c5..9573d67 100644 --- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h +++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h @@ -90,7 +90,8 @@ class BrowserLauncherItemController : public LauncherItemController, virtual void TabInsertedAt(content::WebContents* contents, int index, bool foreground) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabChangedAt( TabContents* tab, int index, diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h index 470a5ed..35f8b88 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h @@ -236,7 +236,7 @@ class ChromeLauncherController // Notify the controller that the state of an non platform app's tabs // have changed, - void UpdateAppState(content::WebContents* tab, AppState app_state); + void UpdateAppState(content::WebContents* contents, AppState app_state); // Limits application refocusing to urls that match |url| for |id|. void SetRefocusURLPattern(ash::LauncherID id, const GURL& url); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index fd45ff2..17c229f 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1055,7 +1055,7 @@ void Browser::TabClosingAt(TabStripModel* tab_strip_model, SetAsDelegate(contents, NULL); } -void Browser::TabDetachedAt(TabContents* contents, int index) { +void Browser::TabDetachedAt(WebContents* contents, int index) { TabDetachedAtImpl(contents, index, DETACH_TYPE_DETACH); } @@ -1149,7 +1149,7 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model, TabContents* old_contents, TabContents* new_contents, int index) { - TabDetachedAtImpl(old_contents, index, DETACH_TYPE_REPLACE); + TabDetachedAtImpl(old_contents->web_contents(), index, DETACH_TYPE_REPLACE); SessionService* session_service = SessionServiceFactory::GetForProfile(profile_); if (session_service) @@ -2162,37 +2162,38 @@ void Browser::CloseFrame() { window_->Close(); } -void Browser::TabDetachedAtImpl(TabContents* contents, int index, +void Browser::TabDetachedAtImpl(content::WebContents* contents, + int index, DetachType type) { if (type == DETACH_TYPE_DETACH) { // Save the current location bar state, but only if the tab being detached // is the selected tab. Because saving state can conditionally revert the // location bar, saving the current tab's location bar state to a // non-selected tab can corrupt both tabs. - if (contents == chrome::GetActiveTabContents(this)) { + if (contents == chrome::GetActiveWebContents(this)) { LocationBar* location_bar = window()->GetLocationBar(); if (location_bar) - location_bar->SaveStateToContents(contents->web_contents()); + location_bar->SaveStateToContents(contents); } if (!tab_strip_model_->closing_all()) SyncHistoryWithTabs(0); } - SetAsDelegate(contents->web_contents(), NULL); - RemoveScheduledUpdatesFor(contents->web_contents()); + SetAsDelegate(contents, NULL); + RemoveScheduledUpdatesFor(contents); if (find_bar_controller_.get() && index == active_index()) { find_bar_controller_->ChangeWebContents(NULL); } // Stop observing search model changes for this tab. - search_delegate_->OnTabDetached(contents->web_contents()); + search_delegate_->OnTabDetached(contents); registrar_.Remove(this, content::NOTIFICATION_INTERSTITIAL_ATTACHED, - content::Source<WebContents>(contents->web_contents())); + content::Source<WebContents>(contents)); registrar_.Remove(this, content::NOTIFICATION_INTERSTITIAL_DETACHED, - content::Source<WebContents>(contents->web_contents())); + content::Source<WebContents>(contents)); } bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index b8460ad..6f768bc 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -433,7 +433,8 @@ class Browser : public TabStripModelObserver, virtual void TabClosingAt(TabStripModel* tab_strip_model, content::WebContents* contents, int index) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabDeactivated(TabContents* contents) OVERRIDE; virtual void ActiveTabChanged(TabContents* old_contents, TabContents* new_contents, @@ -785,7 +786,9 @@ class Browser : public TabStripModelObserver, // after a return to the message loop. void CloseFrame(); - void TabDetachedAtImpl(TabContents* contents, int index, DetachType type); + void TabDetachedAtImpl(content::WebContents* contents, + int index, + DetachType type); // Shared code between Reload() and ReloadIgnoringCache(). void ReloadInternal(WindowOpenDisposition disposition, bool ignore_cache); diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index 4cd9a4b..622a324 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc @@ -718,7 +718,7 @@ void BrowserCommandController::TabInsertedAt(WebContents* contents, AddInterstitialObservers(contents); } -void BrowserCommandController::TabDetachedAt(TabContents* contents, int index) { +void BrowserCommandController::TabDetachedAt(WebContents* contents, int index) { RemoveInterstitialObservers(contents); } @@ -726,7 +726,7 @@ void BrowserCommandController::TabReplacedAt(TabStripModel* tab_strip_model, TabContents* old_contents, TabContents* new_contents, int index) { - RemoveInterstitialObservers(old_contents); + RemoveInterstitialObservers(old_contents->web_contents()); AddInterstitialObservers(new_contents->web_contents()); } @@ -1172,11 +1172,11 @@ void BrowserCommandController::AddInterstitialObservers(WebContents* contents) { } void BrowserCommandController::RemoveInterstitialObservers( - TabContents* contents) { + WebContents* contents) { registrar_.Remove(this, content::NOTIFICATION_INTERSTITIAL_ATTACHED, - content::Source<WebContents>(contents->web_contents())); + content::Source<WebContents>(contents)); registrar_.Remove(this, content::NOTIFICATION_INTERSTITIAL_DETACHED, - content::Source<WebContents>(contents->web_contents())); + content::Source<WebContents>(contents)); } BrowserWindow* BrowserCommandController::window() { diff --git a/chrome/browser/ui/browser_command_controller.h b/chrome/browser/ui/browser_command_controller.h index 16cd60b..fc6bbbf 100644 --- a/chrome/browser/ui/browser_command_controller.h +++ b/chrome/browser/ui/browser_command_controller.h @@ -96,7 +96,8 @@ class BrowserCommandController : public CommandUpdater::CommandUpdaterDelegate, virtual void TabInsertedAt(content::WebContents* contents, int index, bool foreground) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabReplacedAt(TabStripModel* tab_strip_model, TabContents* old_contents, TabContents* new_contents, @@ -161,7 +162,7 @@ class BrowserCommandController : public CommandUpdater::CommandUpdaterDelegate, // Add/remove observers for interstitial attachment/detachment from // |contents|. void AddInterstitialObservers(content::WebContents* contents); - void RemoveInterstitialObservers(TabContents* contents); + void RemoveInterstitialObservers(content::WebContents* contents); inline BrowserWindow* window(); inline Profile* profile(); diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h index 176acba..0bd5d96 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h @@ -34,7 +34,8 @@ class TabStripModelObserverBridge : public TabStripModelObserver { virtual void TabClosingAt(TabStripModel* tab_strip_model, content::WebContents* contents, int index) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void ActiveTabChanged(TabContents* old_contents, TabContents* new_contents, int index, diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm index f7927cd..c0c315c 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm @@ -52,12 +52,11 @@ void TabStripModelObserverBridge::TabClosingAt(TabStripModel* tab_strip_model, } } -void TabStripModelObserverBridge::TabDetachedAt(TabContents* contents, +void TabStripModelObserverBridge::TabDetachedAt(WebContents* contents, int index) { if ([controller_ respondsToSelector: @selector(tabDetachedWithContents:atIndex:)]) { - [controller_ tabDetachedWithContents:WebContentsOf(contents) - atIndex:index]; + [controller_ tabDetachedWithContents:contents atIndex:index]; } } diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 755521d..e9820ab 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -1204,7 +1204,7 @@ void BrowserWindowGtk::OnPreferenceChanged(PrefServiceBase* service, } } -void BrowserWindowGtk::TabDetachedAt(TabContents* contents, int index) { +void BrowserWindowGtk::TabDetachedAt(WebContents* contents, int index) { // We use index here rather than comparing |contents| because by this time // the model has already removed |contents| from its list, so // chrome::GetActiveWebContents(browser_.get()) will return NULL or something @@ -2321,8 +2321,10 @@ void BrowserWindowGtk::UpdateDevToolsForContents(WebContents* contents) { // Replace tab contents. if (devtools_window_ != new_devtools_window) { - if (devtools_window_) - devtools_container_->DetachTab(devtools_window_->tab_contents()); + if (devtools_window_) { + devtools_container_->DetachTab( + devtools_window_->tab_contents()->web_contents()); + } devtools_container_->SetTab( new_devtools_window ? new_devtools_window->tab_contents() : NULL); if (new_devtools_window) { diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h index 7c2e5d0..800d41e 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.h +++ b/chrome/browser/ui/gtk/browser_window_gtk.h @@ -188,7 +188,8 @@ class BrowserWindowGtk const std::string& pref_name) OVERRIDE; // Overridden from TabStripModelObserver: - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void ActiveTabChanged(TabContents* old_contents, TabContents* new_contents, int index, diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc index 2ba140c..4de25a9 100644 --- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc +++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc @@ -132,8 +132,8 @@ void TabContentsContainerGtk::HideTab(TabContents* tab) { content::Source<WebContents>(tab->web_contents())); } -void TabContentsContainerGtk::DetachTab(TabContents* tab) { - gfx::NativeView widget = tab->web_contents()->GetNativeView(); +void TabContentsContainerGtk::DetachTab(WebContents* tab) { + gfx::NativeView widget = tab->GetNativeView(); // It is possible to detach an unrealized, unparented WebContents if you // slow things down enough in valgrind. Might happen in the real world, too. diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.h b/chrome/browser/ui/gtk/tab_contents_container_gtk.h index 7e2f910..6ba8f2d2 100644 --- a/chrome/browser/ui/gtk/tab_contents_container_gtk.h +++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.h @@ -43,7 +43,7 @@ class TabContentsContainerGtk : public content::NotificationObserver, TabContents* GetVisibleTab() const { return preview_ ? preview_ : tab_; } // Remove the tab from the hierarchy. - void DetachTab(TabContents* tab); + void DetachTab(content::WebContents* tab); // content::NotificationObserver implementation. virtual void Observe(int type, diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc index 1f6474f..cb59ccf 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc @@ -1038,9 +1038,9 @@ void TabStripGtk::TabInsertedAt(WebContents* contents, ReStack(); } -void TabStripGtk::TabDetachedAt(TabContents* contents, int index) { +void TabStripGtk::TabDetachedAt(WebContents* contents, int index) { GenerateIdealBounds(); - StartRemoveTabAnimation(index, contents->web_contents()); + StartRemoveTabAnimation(index, contents); // Have to do this _after_ calling StartRemoveTabAnimation, so that any // previous remove is completed fully and index is valid in sync with the // model index. diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h index e601182..309a202 100644 --- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h +++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h @@ -112,7 +112,8 @@ class TabStripGtk : public TabStripModelObserver, virtual void TabInsertedAt(content::WebContents* contents, int index, bool foreground) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabMoved(TabContents* contents, int from_index, int to_index) OVERRIDE; diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index 521b884..a14e255 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc @@ -241,7 +241,7 @@ TabContents* TabStripModel::DetachTabContentsAt(int index) { if (empty()) closing_all_ = true; FOR_EACH_OBSERVER(TabStripModelObserver, observers_, - TabDetachedAt(removed_contents, index)); + TabDetachedAt(removed_contents->web_contents(), index)); if (empty()) { selection_model_.Clear(); // TabDetachedAt() might unregister observers, so send |TabStripEmpty()| in diff --git a/chrome/browser/ui/tabs/tab_strip_model_observer.cc b/chrome/browser/ui/tabs/tab_strip_model_observer.cc index 18d2de9..bb1c13f 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_observer.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_observer.cc @@ -16,7 +16,7 @@ void TabStripModelObserver::TabClosingAt(TabStripModel* tab_strip_model, int index) { } -void TabStripModelObserver::TabDetachedAt(TabContents* contents, +void TabStripModelObserver::TabDetachedAt(WebContents* contents, int index) { } diff --git a/chrome/browser/ui/tabs/tab_strip_model_observer.h b/chrome/browser/ui/tabs/tab_strip_model_observer.h index 758b204..ceda97e 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_observer.h +++ b/chrome/browser/ui/tabs/tab_strip_model_observer.h @@ -55,11 +55,11 @@ class TabStripModelObserver { content::WebContents* contents, int index); - // The specified TabContents at |index| is being detached, perhaps to + // The specified WebContents at |index| is being detached, perhaps to // be inserted in another TabStripModel. The implementer should take whatever - // action is necessary to deal with the TabContents no longer being + // action is necessary to deal with the WebContents no longer being // present. - virtual void TabDetachedAt(TabContents* contents, int index); + virtual void TabDetachedAt(content::WebContents* contents, int index); // The active TabContents is about to change from |old_contents|. // This gives observers a chance to prepare for an impending switch before it diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc index ce573fd..81b1969 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc @@ -306,9 +306,8 @@ class MockTabStripModelObserver : public TabStripModelObserver { int index) OVERRIDE { states_.push_back(State(contents, index, CLOSE)); } - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE { - states_.push_back( - State(contents ? contents->web_contents() : NULL, index, DETACH)); + virtual void TabDetachedAt(WebContents* contents, int index) OVERRIDE { + states_.push_back(State(contents, index, DETACH)); } virtual void TabDeactivated(TabContents* contents) OVERRIDE { states_.push_back(State(contents ? contents->web_contents() : NULL, diff --git a/chrome/browser/ui/unload_controller.cc b/chrome/browser/ui/unload_controller.cc index 145a556..3768f73 100644 --- a/chrome/browser/ui/unload_controller.cc +++ b/chrome/browser/ui/unload_controller.cc @@ -120,7 +120,8 @@ void UnloadController::TabInsertedAt(content::WebContents* contents, TabAttachedImpl(contents); } -void UnloadController::TabDetachedAt(TabContents* contents, int index) { +void UnloadController::TabDetachedAt(content::WebContents* contents, + int index) { TabDetachedImpl(contents); } @@ -128,7 +129,7 @@ void UnloadController::TabReplacedAt(TabStripModel* tab_strip_model, TabContents* old_contents, TabContents* new_contents, int index) { - TabDetachedImpl(old_contents); + TabDetachedImpl(old_contents->web_contents()); TabAttachedImpl(new_contents->web_contents()); } @@ -150,13 +151,12 @@ void UnloadController::TabAttachedImpl(content::WebContents* contents) { content::Source<content::WebContents>(contents)); } -void UnloadController::TabDetachedImpl(TabContents* contents) { +void UnloadController::TabDetachedImpl(content::WebContents* contents) { if (is_attempting_to_close_browser_) - ClearUnloadState(contents->web_contents(), false); - registrar_.Remove( - this, - content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, - content::Source<content::WebContents>(contents->web_contents())); + ClearUnloadState(contents, false); + registrar_.Remove(this, + content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, + content::Source<content::WebContents>(contents)); } void UnloadController::ProcessPendingTabs() { diff --git a/chrome/browser/ui/unload_controller.h b/chrome/browser/ui/unload_controller.h index 213deb9..512217a 100644 --- a/chrome/browser/ui/unload_controller.h +++ b/chrome/browser/ui/unload_controller.h @@ -74,7 +74,8 @@ class UnloadController : public content::NotificationObserver, virtual void TabInsertedAt(content::WebContents* contents, int index, bool foreground) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabReplacedAt(TabStripModel* tab_strip_model, TabContents* old_contents, TabContents* new_contents, @@ -82,7 +83,7 @@ class UnloadController : public content::NotificationObserver, virtual void TabStripEmpty() OVERRIDE; void TabAttachedImpl(content::WebContents* contents); - void TabDetachedImpl(TabContents* contents); + void TabDetachedImpl(content::WebContents* contents); // Processes the next tab that needs it's beforeunload/unload event fired. void ProcessPendingTabs(); diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 5d387a5..644b3df 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -1401,7 +1401,7 @@ ToolbarView* BrowserView::GetToolbarView() const { /////////////////////////////////////////////////////////////////////////////// // BrowserView, TabStripModelObserver implementation: -void BrowserView::TabDetachedAt(TabContents* contents, int index) { +void BrowserView::TabDetachedAt(WebContents* contents, int index) { // We use index here rather than comparing |contents| because by this time // the model has already removed |contents| from its list, so // browser_->GetActiveWebContents() will return NULL or something else. diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index 60ede17..7936f04 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -351,7 +351,8 @@ class BrowserView : public BrowserWindow, virtual ToolbarView* GetToolbarView() const OVERRIDE; // Overridden from TabStripModelObserver: - virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; + virtual void TabDetachedAt(content::WebContents* contents, + int index) OVERRIDE; virtual void TabDeactivated(TabContents* contents) OVERRIDE; virtual void ActiveTabChanged(TabContents* old_contents, TabContents* new_contents, diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 6841c41..df24e5c 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc @@ -372,7 +372,7 @@ void BrowserTabStripController::TabInsertedAt(WebContents* contents, AddTab(contents, model_index, is_active); } -void BrowserTabStripController::TabDetachedAt(TabContents* contents, +void BrowserTabStripController::TabDetachedAt(WebContents* contents, int model_index) { // Cancel any pending tab transition. hover_tab_selector_.CancelTabTransition(); diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h index 7a60dea..bfd4e9d 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h @@ -74,7 +74,7 @@ class BrowserTabStripController : public TabStripController, virtual void TabInsertedAt(content::WebContents* contents, int model_index, bool is_active) OVERRIDE; - virtual void TabDetachedAt(TabContents* contents, + virtual void TabDetachedAt(content::WebContents* contents, int model_index) OVERRIDE; virtual void TabSelectionChanged( TabStripModel* tab_strip_model, |