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

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 14663010: Save and restore State for ShellWindows, including panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « chrome/browser/extensions/shell_window_geometry_cache_unittest.cc ('k') | chrome/browser/ui/base_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 85af48e9050536d599fc0fbeb31b1f686d7e93f9..0cace940b9e37c8f6268e807077df7b5a6e7a1a3 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())));
« no previous file with comments | « chrome/browser/extensions/shell_window_geometry_cache_unittest.cc ('k') | chrome/browser/ui/base_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698