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

Side by Side 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: Extra layout removed. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 2127
2128 if (devtools) { 2128 if (devtools) {
2129 devtools_web_view_->SetVisible(true); 2129 devtools_web_view_->SetVisible(true);
2130 GetContentsLayoutManager()->SetContentsResizingStrategy(strategy); 2130 GetContentsLayoutManager()->SetContentsResizingStrategy(strategy);
2131 } else { 2131 } else {
2132 devtools_web_view_->SetVisible(false); 2132 devtools_web_view_->SetVisible(false);
2133 GetContentsLayoutManager()->SetContentsResizingStrategy( 2133 GetContentsLayoutManager()->SetContentsResizingStrategy(
2134 DevToolsContentsResizingStrategy()); 2134 DevToolsContentsResizingStrategy());
2135 } 2135 }
2136 contents_container_->Layout(); 2136 contents_container_->Layout();
2137 int order = !devtools || strategy.hide_inspected_contents() ? 0 : -1;
2138 contents_container_->ReorderChildView(contents_web_view_, order);
sky 2014/08/04 17:01:25 Why do you need the reoder here?
2137 } 2139 }
2138 2140
2139 void BrowserView::UpdateUIForContents(WebContents* contents) { 2141 void BrowserView::UpdateUIForContents(WebContents* contents) {
2140 bool needs_layout = MaybeShowBookmarkBar(contents); 2142 bool needs_layout = MaybeShowBookmarkBar(contents);
2141 // TODO(jamescook): This function always returns true. Remove it and figure 2143 // TODO(jamescook): This function always returns true. Remove it and figure
2142 // out when layout is actually required. 2144 // out when layout is actually required.
2143 needs_layout |= MaybeShowInfoBar(contents); 2145 needs_layout |= MaybeShowInfoBar(contents);
2144 if (needs_layout) 2146 if (needs_layout)
2145 Layout(); 2147 Layout();
2146 } 2148 }
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2538 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2537 gfx::Point icon_bottom( 2539 gfx::Point icon_bottom(
2538 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2540 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2539 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2541 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2540 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2542 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2541 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2543 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2542 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2544 top_arrow_height = infobar_top.y() - icon_bottom.y();
2543 } 2545 }
2544 return top_arrow_height; 2546 return top_arrow_height;
2545 } 2547 }
OLDNEW
« 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