diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index e0d9751..682a302 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1174,12 +1174,22 @@ void BrowserWindowGtk::MaybeShowBookmarkBar(TabContents* contents, void BrowserWindowGtk::UpdateDevToolsForContents(TabContents* contents) { TabContents* old_devtools = devtools_container_->GetTabContents(); + TabContents* devtools_contents = contents ? + DevToolsWindow::GetDevToolsContents(contents) : NULL; + if (old_devtools == devtools_contents) + return; + if (old_devtools) devtools_container_->DetachTabContents(old_devtools); - TabContents* devtools_contents = contents ? - DevToolsWindow::GetDevToolsContents(contents) : NULL; devtools_container_->SetTabContents(devtools_contents); + if (devtools_contents) { + // TabContentsViewGtk::WasShown is not called when tab contents is shown by + // anything other than user selecting a Tab. + // See TabContentsViewWin::OnWindowPosChanged for reference on how it should + // be implemented. + devtools_contents->ShowContents(); + } bool should_show = old_devtools == NULL && devtools_contents != NULL; bool should_hide = old_devtools != NULL && devtools_contents == NULL; |