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

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

Issue 7790010: Revert 98679 - Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/chromeos/frame/panel_browser_view.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
===================================================================
--- chrome/browser/sessions/session_restore.cc (revision 98696)
+++ chrome/browser/sessions/session_restore.cc (working copy)
@@ -598,17 +598,8 @@
// tabbed browsers exist.
Browser* last_browser = NULL;
bool has_tabbed_browser = false;
-
- // Determine if there is a visible window.
- bool has_visible_browser = false;
for (std::vector<SessionWindow*>::iterator i = windows->begin();
i != windows->end(); ++i) {
- if ((*i)->show_state != ui::SHOW_STATE_MINIMIZED)
- has_visible_browser = true;
- }
-
- for (std::vector<SessionWindow*>::iterator i = windows->begin();
- i != windows->end(); ++i) {
Browser* browser = NULL;
if (!has_tabbed_browser && (*i)->type == Browser::TYPE_TABBED)
has_tabbed_browser = true;
@@ -622,15 +613,10 @@
chromeos::BootTimesLoader::Get()->AddLoginTimeMarker(
"SessionRestore-CreateRestoredBrowser-Start", false);
#endif
- // Show the first window if none are visible.
- ui::WindowShowState show_state = (*i)->show_state;
- if (!has_visible_browser) {
- show_state = ui::SHOW_STATE_NORMAL;
- has_visible_browser = true;
- }
-
browser = CreateRestoredBrowser(
- static_cast<Browser::Type>((*i)->type), (*i)->bounds, show_state);
+ static_cast<Browser::Type>((*i)->type),
+ (*i)->bounds,
+ (*i)->show_state);
#if defined(OS_CHROMEOS)
chromeos::BootTimesLoader::Get()->AddLoginTimeMarker(
"SessionRestore-CreateRestoredBrowser-End", false);
« no previous file with comments | « chrome/browser/chromeos/frame/panel_browser_view.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698