Chromium Code Reviews| Index: chrome/browser/sessions/session_restore.cc |
| diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc |
| index aca211c8d7bfe979dff23c9fc44f7a8ff4296d36..3f464e59877ffed85d94f4933519a8baa2371ebb 100644 |
| --- a/chrome/browser/sessions/session_restore.cc |
| +++ b/chrome/browser/sessions/session_restore.cc |
| @@ -382,11 +382,15 @@ class SessionRestoreImpl : public content::NotificationObserver { |
| // windows has the same id as specified in active_window_id. |
| Browser* browser_to_activate = nullptr; |
| - // Determine if there is a visible window. |
| + // Determine if there is a visible window, or if the active window exists. |
| + // Even if all windows are ui::SHOW_STATE_MINIMIZED, if one of them is the |
| + // active window it will be made visible by the call to |
| + // browser_to_activate->window()->Activate() later on in this method. |
| bool has_visible_browser = false; |
| for (std::vector<sessions::SessionWindow*>::iterator i = windows->begin(); |
| i != windows->end(); ++i) { |
| - if ((*i)->show_state != ui::SHOW_STATE_MINIMIZED) |
| + if ((*i)->show_state != ui::SHOW_STATE_MINIMIZED || |
| + (*i)->window_id.id() == active_window_id) |
|
sky
2015/09/28 14:54:05
How is that the active window is in a minimized st
shrike
2015/09/28 17:53:41
As browser windows become active, SessionService::
sky
2015/09/28 19:04:01
Ok, makes sense.
|
| has_visible_browser = true; |
| } |