| Index: chrome/browser/ui/gtk/browser_window_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/browser_window_gtk.cc (revision 224205)
|
| +++ chrome/browser/ui/gtk/browser_window_gtk.cc (working copy)
|
| @@ -790,6 +790,35 @@
|
| toolbar_->GetLocationBarView()->SetStarred(is_starred);
|
| }
|
|
|
| +void BrowserWindowGtk::OnActiveTabChanged(WebContents* old_contents,
|
| + WebContents* new_contents,
|
| + int index,
|
| + int reason) {
|
| + TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged");
|
| + if (old_contents && !old_contents->IsBeingDestroyed())
|
| + old_contents->GetView()->StoreFocus();
|
| +
|
| + // Update various elements that are interested in knowing the current
|
| + // WebContents.
|
| + UpdateDevToolsForContents(new_contents);
|
| + infobar_container_->ChangeInfoBarService(
|
| + InfoBarService::FromWebContents(new_contents));
|
| + contents_container_->SetTab(new_contents);
|
| +
|
| + // TODO(estade): after we manage browser activation, add a check to make sure
|
| + // we are the active browser before calling RestoreFocus().
|
| + if (!browser_->tab_strip_model()->closing_all()) {
|
| + new_contents->GetView()->RestoreFocus();
|
| + FindTabHelper* find_tab_helper =
|
| + FindTabHelper::FromWebContents(new_contents);
|
| + if (find_tab_helper->find_ui_active())
|
| + browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
|
| + }
|
| +
|
| + // Update all the UI bits.
|
| + UpdateTitleBar();
|
| + MaybeShowBookmarkBar(false);
|
| +}
|
| void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) {
|
| toolbar_->GetLocationBarView()->ZoomChangedForActiveTab(
|
| can_show_bubble && !toolbar_->IsWrenchMenuShowing());
|
| @@ -1216,36 +1245,6 @@
|
| contents_container_->DetachTab(contents);
|
| }
|
|
|
| -void BrowserWindowGtk::ActiveTabChanged(WebContents* old_contents,
|
| - WebContents* new_contents,
|
| - int index,
|
| - int reason) {
|
| - TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged");
|
| - if (old_contents && !old_contents->IsBeingDestroyed())
|
| - old_contents->GetView()->StoreFocus();
|
| -
|
| - // Update various elements that are interested in knowing the current
|
| - // WebContents.
|
| - UpdateDevToolsForContents(new_contents);
|
| - infobar_container_->ChangeInfoBarService(
|
| - InfoBarService::FromWebContents(new_contents));
|
| - contents_container_->SetTab(new_contents);
|
| -
|
| - // TODO(estade): after we manage browser activation, add a check to make sure
|
| - // we are the active browser before calling RestoreFocus().
|
| - if (!browser_->tab_strip_model()->closing_all()) {
|
| - new_contents->GetView()->RestoreFocus();
|
| - FindTabHelper* find_tab_helper =
|
| - FindTabHelper::FromWebContents(new_contents);
|
| - if (find_tab_helper->find_ui_active())
|
| - browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
|
| - }
|
| -
|
| - // Update all the UI bits.
|
| - UpdateTitleBar();
|
| - MaybeShowBookmarkBar(false);
|
| -}
|
| -
|
| void BrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
|
| // Do nothing if we're in the process of closing the browser window.
|
| if (!window_)
|
|
|