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

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

Issue 155140: DevTools: store devtools split offset only when devtools is being hidden.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 20020)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -602,9 +602,6 @@
for (; bubble != browser_bubbles_.end(); ++bubble) {
(*bubble)->BrowserWindowClosed();
}
-
- g_browser_process->local_state()->SetInteger(
- prefs::kDevToolsSplitLocation, contents_split_->divider_offset());
}
void BrowserView::Activate() {
@@ -1436,6 +1433,7 @@
contents_container_ = new TabContentsContainer;
devtools_container_ = new TabContentsContainer;
+ devtools_container_->SetVisible(false);
contents_split_ = new views::SingleSplitView(
contents_container_,
devtools_container_,
@@ -1607,6 +1605,11 @@
TabContents* devtools_contents =
DevToolsWindow::GetDevToolsContents(tab_contents);
devtools_container_->ChangeTabContents(devtools_contents);
+ if (!devtools_contents && devtools_container_->IsVisible()) {
+ // Store split offset when hiding devtools window only.
+ g_browser_process->local_state()->SetInteger(
+ prefs::kDevToolsSplitLocation, contents_split_->divider_offset());
+ }
devtools_container_->SetVisible(devtools_contents != NULL);
contents_split_->Layout();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698