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

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: for landing 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 bcf02326df3ae7cd0bb1caf9e3722c873bd96ebe..0c002fbd1ebe9dd88ff06df7367c6c0dec16edf8 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 devtools_is_on_top = devtools_index > contents_index;
+ if (strategy.hide_inspected_contents() != devtools_is_on_top)
+ 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