Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
| index 0116260850a6d33fb8bb7a6c85960f7519a22dd9..0216098c052ec86f743f4f1c283f456265258ab9 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -2134,6 +2134,17 @@ void BrowserView::UpdateDevToolsForContents( |
| DevToolsContentsResizingStrategy()); |
| } |
| contents_container_->Layout(); |
| + |
| + if (devtools) { |
| + // When strategy.hide_inspected_contents() returns true, we are hiding |
| + // contents_web_view_ behind the devtools_web_view_. Otherwise, |
| + // contents_web_view_ should be right above the devtools_web_view_. |
| + int devtools_index = contents_container_->GetIndexOf(devtools_web_view_); |
| + int contents_index = contents_container_->GetIndexOf(contents_web_view_); |
| + bool devtoolsIsOnTop = devtools_index > contents_index; |
|
sky
2014/08/05 16:27:48
devtools_is_on_top.
|
| + if (strategy.hide_inspected_contents() != devtoolsIsOnTop) |
| + contents_container_->ReorderChildView(contents_web_view_, devtools_index); |
| + } |
| } |
| void BrowserView::UpdateUIForContents(WebContents* contents) { |