Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1269)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 440663003: DevTools: remove unused resizing strategy code paths, make it solely bounds-based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky's comments addressed. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « chrome/browser/ui/cocoa/dev_tools_controller.mm ('k') | chrome/browser/ui/views/frame/contents_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698