diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 16:07:09 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 16:07:09 +0000 |
commit | 5558ebad44509c3574cf5dce1ad2929b1b0bdeb2 (patch) | |
tree | ac3138f67b978f74482b5d280338bd13b94bf7f9 /chrome/browser/sessions | |
parent | eab36506d9bd8a7b14eaa4d13a99e50d834b855e (diff) | |
download | chromium_src-5558ebad44509c3574cf5dce1ad2929b1b0bdeb2.zip chromium_src-5558ebad44509c3574cf5dce1ad2929b1b0bdeb2.tar.gz chromium_src-5558ebad44509c3574cf5dce1ad2929b1b0bdeb2.tar.bz2 |
Save and restore State for ShellWindows, including panels
This replaces ShellWindow::CreateParams::State with
ui::WindowShowState for simplicty and consistency with
Browser session restore.
BUG=233556
R=flackr@chromium.org, skuhne@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/14031021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 85af48e..0cace94 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -140,6 +140,7 @@ ui::WindowShowState AdjustShowState(ui::WindowShowState state) { case ui::SHOW_STATE_MINIMIZED: case ui::SHOW_STATE_MAXIMIZED: case ui::SHOW_STATE_FULLSCREEN: + case ui::SHOW_STATE_DETACHED: return state; case ui::SHOW_STATE_DEFAULT: @@ -1348,16 +1349,10 @@ void SessionService::BuildCommandsForBrowser( DCHECK(browser && commands); DCHECK(browser->session_id().id()); - ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; - if (browser->window()->IsMaximized()) - show_state = ui::SHOW_STATE_MAXIMIZED; - else if (browser->window()->IsMinimized()) - show_state = ui::SHOW_STATE_MINIMIZED; - commands->push_back( CreateSetWindowBoundsCommand(browser->session_id(), browser->window()->GetRestoredBounds(), - show_state)); + browser->window()->GetRestoredState())); commands->push_back(CreateSetWindowTypeCommand( browser->session_id(), WindowTypeForBrowserType(browser->type()))); |