Chromium Code Reviews| Index: chrome/browser/ui/cocoa/dev_tools_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/dev_tools_controller.mm b/chrome/browser/ui/cocoa/dev_tools_controller.mm |
| index c7a2c11d1f111b6872f563789ce3e205569ec99f..d48cffeb3d6b2d7631473cfca0125ad9c5137ade 100644 |
| --- a/chrome/browser/ui/cocoa/dev_tools_controller.mm |
| +++ b/chrome/browser/ui/cocoa/dev_tools_controller.mm |
| @@ -19,12 +19,9 @@ |
| namespace { |
| -// Default offset of the contents splitter in pixels. |
| -const int kDefaultContentsSplitOffset = 400; |
| - |
| -// Never make the web part of the tab contents smaller than this (needed if the |
| -// window is only a few pixels high). |
| -const int kMinWebHeight = 50; |
| +// Minimal height of devtools pane or content pane when devtools are docked |
| +// to the browser window. |
| +const int kMinDevToolsHeight = 100; |
|
pfeldman
2011/06/07 19:59:12
Please keep it 50.
|
| } // end namespace |
| @@ -100,10 +97,6 @@ const int kMinWebHeight = 50; |
| // Load the default split offset. |
| splitOffset = profile->GetPrefs()-> |
| GetInteger(prefs::kDevToolsSplitLocation); |
| - if (splitOffset < 0) { |
| - // Initial load, set to default value. |
| - splitOffset = kDefaultContentsSplitOffset; |
| - } |
| [splitView_ addSubview:[contentsController_ view]]; |
| } else { |
| DCHECK_EQ([subviews count], 2u); |
| @@ -112,9 +105,10 @@ const int kMinWebHeight = 50; |
| } |
| // Make sure |splitOffset| isn't too large or too small. |
| - splitOffset = std::max(static_cast<CGFloat>(kMinWebHeight), splitOffset); |
| - splitOffset = |
| - std::min(splitOffset, NSHeight([splitView_ frame]) - kMinWebHeight); |
| + splitOffset = std::max(static_cast<CGFloat>(kMinDevToolsHeight), |
|
pfeldman
2011/06/07 19:59:12
One of these should stay kMinWebHeight. I.e. we wh
|
| + splitOffset); |
| + splitOffset = std::min(NSHeight([splitView_ frame]) - kMinDevToolsHeight, |
| + splitOffset); |
| DCHECK_GE(splitOffset, 0) << "kMinWebHeight needs to be smaller than " |
| << "smallest available tab contents space."; |