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 782450c4d52d759125277251b775af9bc650c1d4..3875a5bfcb9c17d6d6d8ac7ffd6bb29a11fde731 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -131,6 +131,11 @@ static const int kStatusBubbleHeight = 20; |
| static const char* const kBrowserViewKey = "__BROWSER_VIEW__"; |
| // How frequently we check for hung plugin windows. |
| static const int kDefaultHungPluginDetectFrequency = 2000; |
| + |
| +// Minimal height of devtools pane or content pane when devtools are docked |
| +// to the browser window. |
| +const int kMinDevToolsHeight = 100; |
| + |
| // How long do we wait before we consider a window hung (in ms). |
| static const int kDefaultPluginMessageResponseTimeout = 30000; |
| // The number of milliseconds between loading animation frames. |
| @@ -2148,14 +2153,9 @@ void BrowserView::UpdateDevToolsForContents(TabContentsWrapper* wrapper) { |
| // Restore split offset. |
| int split_offset = browser_->profile()->GetPrefs()-> |
| GetInteger(prefs::kDevToolsSplitLocation); |
| - if (split_offset == -1) { |
| - // Initial load, set to default value. |
| - split_offset = 2 * contents_split_->height() / 3; |
| - } |
| // Make sure user can see both panes. |
| - int min_split_size = contents_split_->height() / 10; |
| - split_offset = std::min(contents_split_->height() - min_split_size, |
| - std::max(min_split_size, split_offset)); |
| + split_offset = std::min(contents_split_->height() - kMinDevToolsHeight, |
| + std::max(kMinDevToolsHeight, split_offset)); |
|
pfeldman
2011/06/07 20:14:51
While I agree that 50 is a good threshold for the
|
| contents_split_->set_divider_offset(split_offset); |
| devtools_container_->SetVisible(true); |